From 0140f11c3bad6f9532e8f0f3c858d08a948bb6b6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 2 Nov 2014 01:55:40 +0100 Subject: [PATCH] avcodec/h264_slice: Clear table pointers to avoid stale pointers Might fix Ticket3889 Signed-off-by: Michael Niedermayer (cherry picked from commit 547fce95858ef83f8c25ae347e3ae3b8ba437fd9) Conflicts: libavcodec/h264_slice.c Conflicts: libavcodec/h264.c --- libavcodec/h264.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 5e92b30a4c..5be363a5e1 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1690,6 +1690,17 @@ static int decode_update_thread_context(AVCodecContext *dst, h->mb_type_pool = NULL; h->ref_index_pool = NULL; h->motion_val_pool = NULL; + 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 (h1->context_initialized) { h->context_initialized = 0;