summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-17 22:28:46 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:13 +0100
commitbf03a878a76dea29b36f368759e9f66102b39a5f (patch)
tree4644eed6af1b02ccdba42dab655f3740f0b0fd33 /libavcodec/h264_slice.c
parentb063582e0c4f775a8ba377488bd085595e0e7fae (diff)
h264: move mb[_{padding,luma_dc}] into the per-slice context
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 67a8c85236..7c5179618b 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -498,9 +498,6 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
memset(h->sps_buffers, 0, sizeof(h->sps_buffers));
memset(h->pps_buffers, 0, sizeof(h->pps_buffers));
memset(&h->er, 0, sizeof(h->er));
- 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));
h->context_initialized = 0;
memset(&h->cur_pic, 0, sizeof(h->cur_pic));
@@ -509,6 +506,10 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
h->slice_ctx = orig_slice_ctx;
+ memset(&h->slice_ctx[0].mb, 0, sizeof(h->slice_ctx[0].mb));
+ memset(&h->slice_ctx[0].mb_luma_dc, 0, sizeof(h->slice_ctx[0].mb_luma_dc));
+ memset(&h->slice_ctx[0].mb_padding, 0, sizeof(h->slice_ctx[0].mb_padding));
+
h->avctx = dst;
h->DPB = NULL;
h->qscale_table_pool = NULL;