[FFmpeg-cvslog] avcodec/h264_slice: Clear table pointers to avoid stale pointers

Michael Niedermayer git at videolan.org
Mon Dec 8 19:26:10 CET 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Sun Nov  2 01:55:40 2014 +0100| [8b8d794800db9b0980760eb8dfb410dfbba54c2d] | committer: Michael Niedermayer

avcodec/h264_slice: Clear table pointers to avoid stale pointers

Might fix Ticket3889

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 547fce95858ef83f8c25ae347e3ae3b8ba437fd9)

Conflicts:

	libavcodec/h264_slice.c

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

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

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 16f4896..6aa20f5 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1821,6 +1821,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;
         for (i = 0; i < 2; i++) {
             h->rbsp_buffer[i] = NULL;
             h->rbsp_buffer_size[i] = 0;



More information about the ffmpeg-cvslog mailing list