diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 15:30:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 15:36:57 +0100 |
commit | 739edc1a7e83cdca27c3defbc3f057e98a3de472 (patch) | |
tree | 6d7c29f22fd58077d5d20682bc73433179c55a0d /libavcodec/h264_slice.c | |
parent | 35a788d953838c1b7f34038ef54fddc3d11994fe (diff) | |
parent | bf03a878a76dea29b36f368759e9f66102b39a5f (diff) | |
download | ffmpeg-739edc1a7e83cdca27c3defbc3f057e98a3de472.tar.gz |
Merge commit 'bf03a878a76dea29b36f368759e9f66102b39a5f'
* commit 'bf03a878a76dea29b36f368759e9f66102b39a5f':
h264: move mb[_{padding,luma_dc}] into the per-slice context
Conflicts:
libavcodec/h264.h
libavcodec/h264_cavlc.c
libavcodec/h264_mb.c
libavcodec/h264_slice.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index cb8328e58d..a4aa671dd8 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -534,23 +534,24 @@ int ff_h264_update_thread_context(AVCodecContext *dst, av_freep(&h->rbsp_buffer[0]); av_freep(&h->rbsp_buffer[1]); ff_h264_unref_picture(h, &h->last_pic_for_ec); - memcpy(h, h1, offsetof(H264Context, mb)); + memcpy(h, h1, offsetof(H264Context, cabac)); memcpy(&h->cabac, &h1->cabac, sizeof(H264Context) - offsetof(H264Context, cabac)); - av_assert0((void*)&h->cabac == &h->mb_padding + 1); + 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)); memset(&h->cur_pic, 0, sizeof(h->cur_pic)); memset(&h->last_pic_for_ec, 0, sizeof(h->last_pic_for_ec)); 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; |