avcodec/av1_parser: export bitstream timing info when available

Based on h264_parser code.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2019-11-10 21:09:51 -03:00
parent 72ec3358f4
commit 0b8742521f
1 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,9 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
av_assert2(ctx->format != AV_PIX_FMT_NONE);
}
if (avctx->framerate.num)
avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1}));
end:
ff_cbs_fragment_reset(s->cbc, td);