[FFmpeg-cvslog] avcodec/v4l2_m2m: fix setting frame period

Ming Qian git at videolan.org
Wed Apr 1 01:20:09 EEST 2020


ffmpeg | branch: master | Ming Qian <ming.qian at nxp.com> | Tue Mar 17 19:29:23 2020 +0800| [edee0d01048d26947053ca1657f11f65c21bd7bd] | committer: Andriy Gelman

avcodec/v4l2_m2m: fix setting frame period

Currently the driver's frame period is incorrectly set to the frame
rate. This is fixed in the commit.

Signed-off-by: Ming Qian <ming.qian at nxp.com>
Signed-off-by: Andriy Gelman <andriy.gelman at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=edee0d01048d26947053ca1657f11f65c21bd7bd
---

 libavcodec/v4l2_m2m_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
index c9f1741bfd..84de63ec9d 100644
--- a/libavcodec/v4l2_m2m_enc.c
+++ b/libavcodec/v4l2_m2m_enc.c
@@ -172,7 +172,7 @@ static int v4l2_prepare_encoder(V4L2m2mContext *s)
      * settingss
      */
     if (avctx->framerate.num || avctx->framerate.den)
-        v4l2_set_timeperframe(s, avctx->framerate.num, avctx->framerate.den);
+        v4l2_set_timeperframe(s, avctx->framerate.den, avctx->framerate.num);
 
     /* set ext ctrls */
     v4l2_set_ext_ctrl(s, MPEG_CID(HEADER_MODE), MPEG_VIDEO(HEADER_MODE_SEPARATE), "header mode");



More information about the ffmpeg-cvslog mailing list