[FFmpeg-devel] [PATCH v3 4/4] lavc/libxavs2: replace 'FrameRate' with 'fps'

hwren hwrenx at 126.com
Mon Oct 14 16:05:58 EEST 2019










At 2019-10-14 19:22:38, "Moritz Barsnick" <barsnick at gmx.net> wrote:
>On Mon, Oct 14, 2019 at 14:52:44 +0800, hwrenx at 126.com wrote:
>> From: hwren <hwrenx at 126.com>
>> +    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
>ffmpeg-devel at ffmpeg.org
>https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>To unsubscribe, visit link above, or email
>ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list