[FFmpeg-devel] [PATCH] lavfi/testsrc: add "decimals" option to the testsrc filter

Nicolas George nicolas.george at normalesup.org
Thu Jan 12 10:15:59 CET 2012


Le tridi 23 nivôse, an CCXX, Stefano Sabatini a écrit :
> -        second = test->nb_frame * test->time_base.num / test->time_base.den;
> +        double time = av_q2d(test->time_base) * test->nb_frame;
> +        second = (int)(time * pow(10, test->nb_decimals));

This could probably be done more elegantly with av_rescale_q and a
precomputed base, but I guess it does not matter much in a test source.

Apart from that, it looks nice to me.

PS: You CCing yourself causes my mailer to CC you too when I reply: is it on
purpose?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120112/fb3e42b8/attachment.asc>


More information about the ffmpeg-devel mailing list