[FFmpeg-cvslog] h264: Clear ERContext.cur_pic when unref'ing current picture.

Dale Curtis git at videolan.org
Fri Jan 3 00:02:25 CET 2014


ffmpeg | branch: master | Dale Curtis <dalecurtis at chromium.org> | Thu Jan  2 14:29:38 2014 -0800| [4feca2214a0b69dcbe4d1c7cd145c3881459e867] | committer: Michael Niedermayer

h264: Clear ERContext.cur_pic when unref'ing current picture.

Signed-off-by: Dale Curtis <dalecurtis at chromium.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4feca2214a0b69dcbe4d1c7cd145c3881459e867
---

 libavcodec/h264.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index c55e11c..d125f54 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -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;
 



More information about the ffmpeg-cvslog mailing list