Re: [libav-devel] [PATCH 7/7] openh264: Use the framerate information
On 17/02/2018 04:55, Vittorio Giovara wrote: On Fri, Feb 16, 2018 at 12:02 PM, Luca Barbatowrote: And not the often misleading timebase one. --- libavcodec/libopenh264enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index d075cb0854..f779c46196 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -129,7 +129,7 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif -param.fMaxFrameRate = avctx->time_base.den / avctx->time_base.num; +param.fMaxFrameRate = avctx->framerate.num / avctx->framerate.den; why not av_q2d while at it? Now it can be done, indeed. Thanks for reminding me :) ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 7/7] openh264: Use the framerate information
On Fri, Feb 16, 2018 at 12:02 PM, Luca Barbatowrote: > And not the often misleading timebase one. > --- > libavcodec/libopenh264enc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c > index d075cb0854..f779c46196 100644 > --- a/libavcodec/libopenh264enc.c > +++ b/libavcodec/libopenh264enc.c > @@ -129,7 +129,7 @@ FF_DISABLE_DEPRECATION_WARNINGS > FF_ENABLE_DEPRECATION_WARNINGS > #endif > > -param.fMaxFrameRate = avctx->time_base.den / > avctx->time_base.num; > +param.fMaxFrameRate = avctx->framerate.num / > avctx->framerate.den; > why not av_q2d while at it? -- Vittorio ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 7/7] openh264: Use the framerate information
And not the often misleading timebase one. --- libavcodec/libopenh264enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index d075cb0854..f779c46196 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -129,7 +129,7 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif -param.fMaxFrameRate = avctx->time_base.den / avctx->time_base.num; +param.fMaxFrameRate = avctx->framerate.num / avctx->framerate.den; param.iPicWidth = avctx->width; param.iPicHeight = avctx->height; param.iTargetBitrate = avctx->bit_rate; -- 2.12.2 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel