[FFmpeg-cvslog] avcodec/h264: clear cur_pic structure instead of duplicating it in ff_h264_update_thread_context ()

Michael Niedermayer git at videolan.org
Mon Jun 23 17:55:49 CEST 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Thu Apr  3 23:46:25 2014 +0200| [c5085a0301434347765152e5151c94eb1e300159] | committer: Michael Niedermayer

avcodec/h264: clear cur_pic structure instead of duplicating it in ff_h264_update_thread_context()

Fixes crash

Found-by: iive
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 8710ee11d75eebc17e7d63bc6ffb91766933bd68)

Conflicts:

	libavcodec/h264_slice.c
(cherry picked from commit cb44d69665596d2f19e032fc852162b0a6de0562)

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

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

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 807994f..99f463c 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1799,6 +1799,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
         memset(&h->mb, 0, sizeof(h->mb));
         memset(&h->mb_luma_dc, 0, sizeof(h->mb_luma_dc));
         memset(&h->mb_padding, 0, sizeof(h->mb_padding));
+        memset(&h->cur_pic, 0, sizeof(h->cur_pic));
 
         h->avctx             = dst;
         h->DPB               = NULL;



More information about the ffmpeg-cvslog mailing list