Reset cm->ref_frame_map[] after decrease_ref_count
After the decrease_ref_count(buf) call, cm->ref_frame_map[ref_idx]
no longer owns a reference, so immediately reset it to NULL to avoid
leaving a dangling pointer if we return early (via an
aom_internal_error() call) on error.
Change-Id: I3b75eeb89c392de7ba32d2740c5f82ddb444d9ec
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 8c29861..cf2780b 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -4925,6 +4925,7 @@
lock_buffer_pool(pool);
decrease_ref_count(buf, pool);
unlock_buffer_pool(pool);
+ cm->ref_frame_map[ref_idx] = NULL;
}
// If no corresponding buffer exists, allocate a new buffer with all
// pixels set to neutral grey.