diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-30 01:27:28 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-30 01:27:28 +0400 |
commit | be0b869b04c049ea00fd178bb4c4fe4b767ed31d (patch) | |
tree | 2f0ae8973b9cc3a5a1fbec3a47828570e83b7d67 /libavcodec/mpeg4videodec.c | |
parent | f924d6e40b269158ff54f5b5a6f08ae3fdefbd5c (diff) | |
parent | 35e0833d410e31d9fd35695ad798c5d13de2af58 (diff) |
Merge commit '35e0833d410e31d9fd35695ad798c5d13de2af58'
* commit '35e0833d410e31d9fd35695ad798c5d13de2af58':
mpeg4videodec: add a mpeg4-specific private context.
Conflicts:
libavcodec/mpeg4video_parser.c
libavcodec/mpeg4videodec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg4videodec.c')
-rw-r--r-- | libavcodec/mpeg4videodec.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index b6a8faf313..50de9eca81 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2501,9 +2501,24 @@ av_cold void ff_mpeg4videodec_static_init(void) { } } +static int mpeg4_update_thread_context(AVCodecContext *dst, + const AVCodecContext *src) +{ + Mpeg4DecContext *s = dst->priv_data; + const Mpeg4DecContext *s1 = src->priv_data; + + int ret = ff_mpeg_update_thread_context(dst, src); + + if (ret < 0) + return ret; + + return 0; +} + static av_cold int decode_init(AVCodecContext *avctx) { - MpegEncContext *s = avctx->priv_data; + Mpeg4DecContext *ctx = avctx->priv_data; + MpegEncContext *s = &ctx->m; int ret; s->divx_version = @@ -2572,7 +2587,7 @@ AVCodec ff_mpeg4_decoder = { .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_MPEG4, - .priv_data_size = sizeof(MpegEncContext), + .priv_data_size = sizeof(Mpeg4DecContext), .init = decode_init, .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, @@ -2583,7 +2598,7 @@ AVCodec ff_mpeg4_decoder = { .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, .profiles = NULL_IF_CONFIG_SMALL(mpeg4_video_profiles), - .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_mpeg_update_thread_context), + .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context), .priv_class = &mpeg4_class, }; |