On Tue, 17. Mar 19:29, Ming Qian wrote: > v4l2 set the frame rate through frame intervals, > not set frame rate directly. > the frame rate and frame intervals are reciprocal. > so in libavdevice/v4l2.c we can see the following code: > tpf->numerator = framerate_q.den; > tpf->denominator = framerate_q.num; > > Signed-off-by: Ming Qian <ming.q...@nxp.com> > --- > 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"); > -- > 2.17.1
v4l2m2m doesn't have a maintainer. Any objections if I apply this patch? I'd set commit message to: "The driver's frame period is incorrectly set to the frame rate. This is fixed in the commit." Thanks -- Andriy _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".