h264: Clear ERContext.cur_pic when unref'ing current picture.
authorDale Curtis <dalecurtis@chromium.org>
Thu, 2 Jan 2014 22:29:38 +0000 (14:29 -0800)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 2 Jan 2014 22:49:06 +0000 (23:49 +0100)
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
libavcodec/h264.c

index c55e11c..d125f54 100644 (file)
@@ -1972,6 +1972,10 @@ static int h264_frame_start(H264Context *h)
 
     h->cur_pic_ptr = pic;
     unref_picture(h, &h->cur_pic);
+    if (CONFIG_ERROR_RESILIENCE) {
+        h->er.cur_pic = NULL;
+    }
+
     if ((ret = ref_picture(h, &h->cur_pic, h->cur_pic_ptr)) < 0)
         return ret;