Re: [libav-devel] [PATCH 7/7] openh264: Use the framerate information

2018-02-17 Thread Luca Barbato

On 17/02/2018 04:55, Vittorio Giovara wrote:

On Fri, Feb 16, 2018 at 12:02 PM, Luca Barbato  wrote:


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

2018-02-16 Thread Vittorio Giovara
On Fri, Feb 16, 2018 at 12:02 PM, Luca Barbato  wrote:

> 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

2018-02-16 Thread Luca Barbato
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