From 7de10a5f928dc7b62c61cbce58f476df27db4a00 Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Thu, 9 Aug 2018 18:47:02 -0700 Subject: [PATCH] vp9: don't release buffer for current frame. when resync is needed, we flush all frame buffers on key frame. BUG=b/112406540 BUG=oss-fuzz:9722 Change-Id: Ie53feb12126f25877436eba40317400bf69c6207 --- vp9/decoder/vp9_decodeframe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index 9c793f710..80ecb9de3 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -1736,6 +1736,7 @@ static INLINE void flush_all_fb_on_key(VP9_COMMON *cm) { BufferPool *const pool = cm->buffer_pool; int i; for (i = 0; i < FRAME_BUFFERS; ++i) { + if (i == cm->new_fb_idx) continue; frame_bufs[i].ref_count = 0; if (!frame_bufs[i].released) { pool->release_fb_cb(pool->cb_priv, &frame_bufs[i].raw_frame_buffer); -- 2.40.0