summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4videodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-29 21:26:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-29 21:26:59 +0200
commit58eaa95116d914c8de303893ddf9fa9b11803b3f (patch)
tree758f6ccd54c101493f24a738457ea3ffec54344e /libavcodec/mpeg4videodec.c
parent92de4450347cbee96e64de341ac6fa733ea13cd1 (diff)
parentccbf370f2000b9b27f4af259c23007d67f7ea46e (diff)
Merge commit 'ccbf370f2000b9b27f4af259c23007d67f7ea46e'
* commit 'ccbf370f2000b9b27f4af259c23007d67f7ea46e': mpegvideo: move vol_control_parameters to the only place it is used Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg4videodec.c')
-rw-r--r--libavcodec/mpeg4videodec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 0b25e2982c..41a2ff992f 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -1723,7 +1723,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
s->avctx->sample_aspect_ratio = ff_h263_pixel_aspect[s->aspect_ratio_info];
}
- if ((s->vol_control_parameters = get_bits1(gb))) { /* vol control parameter */
+ if ((ctx->vol_control_parameters = get_bits1(gb))) { /* vol control parameter */
int chroma_format = get_bits(gb, 2);
if (chroma_format != CHROMA_420)
av_log(s->avctx, AV_LOG_ERROR, "illegal chroma format\n");
@@ -2124,7 +2124,7 @@ int ff_mpeg4_workaround_bugs(AVCodecContext *avctx)
if (ctx->xvid_build == -1 && ctx->divx_version == -1 && ctx->lavc_build == -1)
if (s->codec_tag == AV_RL32("DIVX") && s->vo_type == 0 &&
- s->vol_control_parameters == 0)
+ ctx->vol_control_parameters == 0)
ctx->divx_version = 400; // divx 4
if (ctx->xvid_build >= 0 && ctx->divx_version >= 0) {
@@ -2228,7 +2228,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
s->pict_type = get_bits(gb, 2) + AV_PICTURE_TYPE_I; /* pict type: I = 0 , P = 1 */
if (s->pict_type == AV_PICTURE_TYPE_B && s->low_delay &&
- s->vol_control_parameters == 0 && !(s->flags & CODEC_FLAG_LOW_DELAY)) {
+ ctx->vol_control_parameters == 0 && !(s->flags & CODEC_FLAG_LOW_DELAY)) {
av_log(s->avctx, AV_LOG_ERROR, "low_delay flag incorrectly, clearing it\n");
s->low_delay = 0;
}
@@ -2446,7 +2446,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
s->data_partitioning, ctx->resync_marker,
ctx->num_sprite_warping_points, s->sprite_warping_accuracy,
1 - s->no_rounding, s->vo_type,
- s->vol_control_parameters ? " VOLC" : " ", ctx->intra_dc_threshold,
+ ctx->vol_control_parameters ? " VOLC" : " ", ctx->intra_dc_threshold,
ctx->cplx_estimation_trash_i, ctx->cplx_estimation_trash_p,
ctx->cplx_estimation_trash_b,
s->time,
@@ -2470,7 +2470,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
/* detect buggy encoders which don't set the low_delay flag
* (divx4/xvid/opendivx). Note we cannot detect divx5 without b-frames
* easily (although it's buggy too) */
- if (s->vo_type == 0 && s->vol_control_parameters == 0 &&
+ if (s->vo_type == 0 && ctx->vol_control_parameters == 0 &&
ctx->divx_version == -1 && s->picture_number == 0) {
av_log(s->avctx, AV_LOG_WARNING,
"looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag\n");