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. BTW, what value does framerate have if this if-clause isn't met? Zero-initialized, right? 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".
