mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/av1_parser: export timing information when present
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
54c0e72b42
commit
0431f9805e
2 changed files with 30 additions and 24 deletions
|
|
@ -162,6 +162,12 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
|
|||
avctx->color_trc = (enum AVColorTransferCharacteristic) color->transfer_characteristics;
|
||||
avctx->color_range = color->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
|
||||
|
||||
if (seq->timing_info_present_flag) {
|
||||
const AV1RawTimingInfo *timing = &seq->timing_info;
|
||||
av_reduce(&avctx->framerate.den, &avctx->framerate.num,
|
||||
timing->num_units_in_display_tick, timing->time_scale, INT_MAX);
|
||||
}
|
||||
|
||||
if (avctx->framerate.num)
|
||||
avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue