diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-30 03:54:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-30 03:55:39 +0100 |
commit | 1897c4a119d26a4f4781383497c2ab646cf60fe7 (patch) | |
tree | 757b9d985e397f160954b8f280f9ff21a77be205 /libavcodec | |
parent | 47e5eaf8c9869e8e34e96252b8eeaabec7bcc894 (diff) | |
parent | 3b1c0f686d5a162ceb5048910a7ce0bf7ed3a1ab (diff) | |
download | ffmpeg-streaming-1897c4a119d26a4f4781383497c2ab646cf60fe7.zip ffmpeg-streaming-1897c4a119d26a4f4781383497c2ab646cf60fe7.tar.gz |
Merge commit '3b1c0f686d5a162ceb5048910a7ce0bf7ed3a1ab'
* commit '3b1c0f686d5a162ceb5048910a7ce0bf7ed3a1ab':
mpeg4videodec: move new_pred from MpegEncContext to Mpeg4DecContext
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg4video.h | 2 | ||||
-rw-r--r-- | libavcodec/mpeg4videodec.c | 10 | ||||
-rw-r--r-- | libavcodec/mpegvideo.h | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h index f378a8d..79e1065 100644 --- a/libavcodec/mpeg4video.h +++ b/libavcodec/mpeg4video.h @@ -73,6 +73,8 @@ typedef struct Mpeg4DecContext { ///< time distance of first I -> B, used for interlaced b frames int t_frame; + int new_pred; + /* bug workarounds */ int divx_version; int divx_build; diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 7d977e1..ee48cb6 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -472,7 +472,7 @@ int ff_mpeg4_decode_video_packet_header(Mpeg4DecContext *ctx) } } } - if (s->new_pred) + if (ctx->new_pred) decode_new_pred(ctx, &s->gb); return 0; @@ -1978,8 +1978,8 @@ no_cplx_est: ctx->rvlc = get_bits1(gb); if (vo_ver_id != 1) { - s->new_pred = get_bits1(gb); - if (s->new_pred) { + ctx->new_pred = get_bits1(gb); + if (ctx->new_pred) { av_log(s->avctx, AV_LOG_ERROR, "new pred not supported\n"); skip_bits(gb, 2); /* requested upstream message type */ skip_bits1(gb); /* newpred segment type */ @@ -1988,7 +1988,7 @@ no_cplx_est: av_log(s->avctx, AV_LOG_ERROR, "reduced resolution VOP not supported\n"); } else { - s->new_pred = 0; + ctx->new_pred = 0; } s->scalability = get_bits1(gb); @@ -2318,7 +2318,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) av_log(s->avctx, AV_LOG_ERROR, "vop not coded\n"); return FRAME_SKIPPED; } - if (s->new_pred) + if (ctx->new_pred) decode_new_pred(ctx, gb); if (ctx->shape != BIN_ONLY_SHAPE && diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index c16da96..4d7ed72 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -608,7 +608,6 @@ typedef struct MpegEncContext { int scalability; int hierachy_type; int enhancement_type; - int new_pred; int aspect_ratio_info; //FIXME remove int sprite_warping_accuracy; int data_partitioning; ///< data partitioning flag from header |