diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-30 06:20:05 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-30 06:20:11 +0400 |
commit | 0cea39fdd310caaec96f5fe985fe7fcf8dcf38da (patch) | |
tree | e077b3b735d42bf4e512e050dd9cb455d5180eef /libavcodec/mpeg4videodec.c | |
parent | 79c1cdd973cb8abcbb95affd3fd6d8ba75e980f2 (diff) | |
parent | b1aacd56685cd131f517e0551834a0bbd3f5f809 (diff) |
Merge commit 'b1aacd56685cd131f517e0551834a0bbd3f5f809'
* commit 'b1aacd56685cd131f517e0551834a0bbd3f5f809':
mpeg4videodec: move t_frame from MpegEncContext to Mpeg4DecContext
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg4videodec.c')
-rw-r--r-- | libavcodec/mpeg4videodec.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index cc0f5054a3..6d74e62cbc 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1771,7 +1771,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) else s->avctx->time_base.num = 1; - s->t_frame = 0; + ctx->t_frame = 0; if (ctx->shape != BIN_ONLY_SHAPE) { if (ctx->shape == RECT_SHAPE) { @@ -2290,14 +2290,14 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) } ff_mpeg4_init_direct_mv(s); - if (s->t_frame == 0) - s->t_frame = s->pb_time; - if (s->t_frame == 0) - s->t_frame = 1; // 1/0 protection - s->pp_field_time = (ROUNDED_DIV(s->last_non_b_time, s->t_frame) - - ROUNDED_DIV(s->last_non_b_time - s->pp_time, s->t_frame)) * 2; - s->pb_field_time = (ROUNDED_DIV(s->time, s->t_frame) - - ROUNDED_DIV(s->last_non_b_time - s->pp_time, s->t_frame)) * 2; + if (ctx->t_frame == 0) + ctx->t_frame = s->pb_time; + if (ctx->t_frame == 0) + ctx->t_frame = 1; // 1/0 protection + s->pp_field_time = (ROUNDED_DIV(s->last_non_b_time, ctx->t_frame) - + ROUNDED_DIV(s->last_non_b_time - s->pp_time, ctx->t_frame)) * 2; + s->pb_field_time = (ROUNDED_DIV(s->time, ctx->t_frame) - + ROUNDED_DIV(s->last_non_b_time - s->pp_time, ctx->t_frame)) * 2; if (!s->progressive_sequence) { if (s->pp_field_time <= s->pb_field_time || s->pb_field_time <= 1) return FRAME_SKIPPED; |