mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
avcodec/vc1: fix time_base and framerate
They are not just inverses of each other. This should restore behavior to before the introduction of framerate Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
09450c5509
commit
220a15c074
@ -490,7 +490,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (v->broadcast) { // Pulldown may be present
|
if (v->broadcast) { // Pulldown may be present
|
||||||
v->s.avctx->framerate.num *= 2;
|
|
||||||
v->s.avctx->ticks_per_frame = 2;
|
v->s.avctx->ticks_per_frame = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,6 +112,8 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (avctx->framerate.num)
|
||||||
|
avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1}));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vc1_parse(AVCodecParserContext *s,
|
static int vc1_parse(AVCodecParserContext *s,
|
||||||
|
Loading…
Reference in New Issue
Block a user