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

Dale Curtis git at videolan.org
Tue Mar 4 01:18:58 CET 2014


ffmpeg | branch: release/2.0 | Dale Curtis <dalecurtis at chromium.org> | Thu Jan  2 14:29:38 2014 -0800| [33aa2c5d6b22df74ec508c24bbb9cb1b4feec787] | committer: Michael Niedermayer

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

Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
(cherry picked from commit 4feca2214a0b69dcbe4d1c7cd145c3881459e867)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index a5c2147..9111d92 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1847,6 +1847,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