avcodec/h264: clear cur_pic structure instead of duplicating it in ff_h264_update_thr...
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Apr 2014 21:46:25 +0000 (23:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 3 Apr 2014 21:57:32 +0000 (23:57 +0200)
Fixes crash

Found-by: iive
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264_slice.c

index ed3c8fe..17557d1 100644 (file)
@@ -576,6 +576,7 @@ int ff_h264_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;