ffmpeg | branch: release/0.10 | Michael Niedermayer <michae...@gmx.at> | Sun Nov 2 01:55:40 2014 +0100| [3296e30d372d8ed0ada4b5fc010d2b0fc6b37e97] | committer: Michael Niedermayer
avcodec/h264_slice: Clear table pointers to avoid stale pointers Might fix Ticket3889 Signed-off-by: Michael Niedermayer <michae...@gmx.at> (cherry picked from commit 547fce95858ef83f8c25ae347e3ae3b8ba437fd9) Conflicts: libavcodec/h264_slice.c Conflicts: libavcodec/h264.c > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3296e30d372d8ed0ada4b5fc010d2b0fc6b37e97 --- libavcodec/h264.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e726fd8..988e819 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1224,6 +1224,19 @@ static int decode_update_thread_context(AVCodecContext *dst, const AVCodecContex memcpy(&h->s + 1, &h1->s + 1, sizeof(H264Context) - sizeof(MpegEncContext)); //copy all fields after MpegEnc memset(h->sps_buffers, 0, sizeof(h->sps_buffers)); memset(h->pps_buffers, 0, sizeof(h->pps_buffers)); + + h->intra4x4_pred_mode= NULL; + h->non_zero_count = NULL; + h->slice_table_base = NULL; + h->slice_table = NULL; + h->cbp_table = NULL; + h->chroma_pred_mode_table = NULL; + memset(h->mvd_table, 0, sizeof(h->mvd_table)); + h->direct_table = NULL; + h->list_counts = NULL; + h->mb2b_xy = NULL; + h->mb2br_xy = NULL; + if (ff_h264_alloc_tables(h) < 0) { av_log(dst, AV_LOG_ERROR, "Could not allocate memory for h264\n"); return AVERROR(ENOMEM); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog