At 2019-10-14 19:22:38, "Moritz Barsnick" <[email protected]> wrote:
>On Mon, Oct 14, 2019 at 14:52:44 +0800, [email protected] wrote:
>> From: hwren <[email protected]>
>> +    float framerate;
>[...]
>> +    if (avctx->framerate.den > 0 && avctx->framerate.num > 0) {
>> +        framerate = (float)avctx->framerate.num / 
>> (float)avctx->framerate.den;
>> +    }
>
>It should suffice to cast only .den. See av_q2d(). Actually, since it's
>only used in _init() anyway, you could use av_q2d() at the cost of
>double versus float.
>

Indeed, thanks for review.

>BTW, what value does framerate have if this if-clause isn't met?
>Zero-initialized, right?
>

Encoder will use its default frame rate value (25 for xavs2).

Thanks,
Huiwen Ren

>Cheers,
>Moritz
>_______________________________________________
>ffmpeg-devel mailing list
>[email protected]
>https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>To unsubscribe, visit link above, or email
>[email protected] with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to