[FFmpeg-cvslog] avcodec/av1_parser: export bitstream timing info when available
James Almer
git at videolan.org
Wed Nov 13 03:22:17 EET 2019
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Nov 10 21:09:51 2019 -0300| [0b8742521fa226dd0467d7a7f457b5018d96b22a] | committer: James Almer
avcodec/av1_parser: export bitstream timing info when available
Based on h264_parser code.
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b8742521fa226dd0467d7a7f457b5018d96b22a
---
libavcodec/av1_parser.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c
index b916608d65..510cad987b 100644
--- a/libavcodec/av1_parser.c
+++ b/libavcodec/av1_parser.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list