[FFmpeg-devel] [PATCH] fix for roundup issue 2475
Tue Jan 4 10:02:20 CET 2011
On 4 jan 2011, at 06:29, Daniel Kang <daniel.d.kang at gmail.com> wrote:
> On Sun, Jan 2, 2011 at 12:34 AM, Daniel Kang <daniel.d.kang at gmail.com>wrote:
>> I am a Google Code-In student, and as part of a task, I have used zzuf
>> to generate a wav file that causes ffmpeg to fail an assertion. The
>> roundup issue is 2475. The error occurs when invalid sampling rates
>> (i.e. negative ones) fail the assertion.
>> I have attached a patch that adds a sanity check on sampling rates. It
>> should also work for other audio types, but I could not generate a file
>> that fails with the same error. Are there any comments?
> I have uploaded a third sample that fails the assertion. It seems as
> though my patch works for audio files in general, as compute_frame_rate
> is a general function. Since I have not had any comments, is this
> solution acceptable?
I think it would still set invalid values if e.g. one is 1 and the other is 0.
The condition should possibly be both > 0 or both 0.
More information about the ffmpeg-devel