]> granicus.if.org Git - libvpx/commitdiff
vp9: don't release buffer for current frame.
authorJerome Jiang <jianj@google.com>
Fri, 10 Aug 2018 01:47:02 +0000 (18:47 -0700)
committerJames Zern <jzern@google.com>
Sat, 11 Aug 2018 00:00:31 +0000 (00:00 +0000)
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

index 9c793f710772362a7906613d3bea11121cc9ab01..80ecb9de365bc9d4fc61b024be81e6c4c5dda46d 100644 (file)
@@ -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);