summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMing Qian <ming.qian@nxp.com>2020-03-17 19:29:23 +0800
committerAndriy Gelman <andriy.gelman@gmail.com>2020-03-31 17:24:42 -0400
commitedee0d01048d26947053ca1657f11f65c21bd7bd (patch)
tree01616f240706328989f69907fcdb1b9e08649dfa
parent67de1865b1ee9e3616124b8fb6f1c34cba1b1d5f (diff)
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@nxp.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
-rw-r--r--libavcodec/v4l2_m2m_enc.c2
1 files changed, 1 insertions, 1 deletions
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");