[FFmpeg-devel] [PATCH] Fix possible SIGFPEs with bad mov timings. Based on chromium patch 35_mov_bad_timings.patch

Ronald S. Bultje rsbultje
Thu Nov 19 20:49:30 CET 2009


Hi,

On Thu, Nov 19, 2009 at 1:52 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Nov 19, 2009 at 12:12:30PM -0500, Ronald S. Bultje wrote:
>> B) uint32_t num = READ_BE32(..), den = READ_BE32(..);
>> ? ? if (num & 0x80000000 || den & 0x80000000) { den >>= 1; num >>= 1 }
>
> dont do this period
> we have av_reduce() that does this properly, and av_set_pts_info() already
> uses it.
[..]
>> It's not like this 32th bit is suddenly gonna cause a movie to go out of sync...
>
> no, ill bet it is already out of sync ;)
> besides the loss of precission by av_reduce() should be quite small

If av_reduce() already does this (seems like it does), then why do we
need this patch?

Does av_reduce() not handle int boundaries (a quick check suggests
that it doesn't, but I may be wrong)?

Ronald



More information about the ffmpeg-devel mailing list