[FFmpeg-devel] [PATCH] ffmpeg: remove obsolete workaround in trim insertion.

Nicolas George nicolas.george at normalesup.org
Sat Aug 10 19:30:15 CEST 2013

Le tridi 23 thermidor, an CCXXI, Hendrik Leppkes a écrit :
> This commit broke the FATE test flic-af11-palette-change on a number
> of systems, including mingw, BSD and linux (all 32-bit and gcc as far
> as i can see, 64-bit and other compilers seem unaffected so far)

Thanks for the report. It is caused by double -> int rounding differences.

More precisely, the requested duration is 3.3, expressed as a floating point
it gives the binary representation, in little endian, "66 66 66 66 66 66 0a
40", which makes it between 3.2999999999999996003 and 3.3000000000000000444,
and theoretically 3.2999999999999998223. When converting it to integer in
milliseconds, x86 comes with 3299999 while x86_64 comes with 3300000. This
is then converted to the time base (1/35), respectively 115.499965 rounded
to 115 and 115.5 rounded to 116.

I suspect Paul's intent of doing away with floating point arithmetic in the
trim filter would fix the problem. In the meantime, the attached patch seems
to fix things, and is probably more correct (1/35 time base means two
significant decimal digits) too.

If it is deemed correct, feel free to push without waiting for me in order
to get FATE green again as soon as possible.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-tests-fli-avoid-rounding-errors-in-t-option.patch
Type: text/x-diff
Size: 1008 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130810/8163154c/attachment.bin>
-------------- 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/20130810/8163154c/attachment.asc>

More information about the ffmpeg-devel mailing list