[FFmpeg-devel] [PATCH 3/3] libavcodec/v4l2_m2m_dec: set default time base
Lukas Rusak
lorusak at gmail.com
Tue Jan 9 01:27:39 EET 2018
This default time base should be set in order for ffmpeg to rescale the timebase in v4l2_get_pts and v4l2_set_pts
---
libavcodec/v4l2_m2m_dec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index 8308613978..4de091a011 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -177,6 +177,8 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
capture->av_codec_id = AV_CODEC_ID_RAWVIDEO;
capture->av_pix_fmt = avctx->pix_fmt;
+ avctx->time_base = AV_TIME_BASE_Q;
+
ret = ff_v4l2_m2m_codec_init(avctx);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "can't configure decoder\n");
--
2.14.3
More information about the ffmpeg-devel
mailing list