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

Baptiste Coudurier baptiste.coudurier
Thu Nov 19 22:50:00 CET 2009


On 11/19/2009 01:22 PM, Albert J. Wong (???) wrote:
> On Thu, Nov 19, 2009 at 1:15 PM, Baptiste Coudurier<
> baptiste.coudurier at gmail.com>  wrote:
>
>> On 11/19/2009 01:10 PM, Albert J. Wong (???) wrote:
>>
>>> On Thu, Nov 19, 2009 at 11:52 AM, Ronald S. Bultje<rsbultje at gmail.com
>>>> wrote:
>>>
>>>   Hi,
>>>>
>>>> On Thu, Nov 19, 2009 at 2:37 PM, Albert J. Wong (???)
>>>> <ajwong at chromium.org>   wrote:
>>>>
>>>>> How about something like
>>>>>
>>>>> if (c->time_scale<   0)
>>>>>   return AVERROR_INVALIDDATA;
>>>>> else if (!c->time_scale)
>>>>>   c->time_scale = 1;
>>>>> if (sc->time_scale<=0) {
>>>>>    // the log message whatever that was...
>>>>>   sc_time_scape = c->time_scale;
>>>>> }
>>>>>
>>>>> ?
>>>>>
>>>>> That lets us handle the raw case, and chooses to ignore the potentially
>>>>> negative values.  Is there's a better middle ground that I'm missing?
>>>>>
>>>>
>>>> Putting this in any (=>   every) demuxer is silly, imo.
>>>>
>>>>
>>>>   What's a better solution then?
>>>
>>
>> Handling this problem in av_set_pts_info, I think.
>
>
> What about the other places where time_scale is used in an av_rescale, or
> used in regular math.

Update time_scale after av_set_pts_info ?

Ronald objects setting timescale to 1 if it is < 0, I said that I was ok 
with this workaround. Ronald ?

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list