[FFmpeg-devel] [PATCH] wav: Add check for 'fmt' tag

Paul B Mahol onemda at gmail.com
Wed Jul 18 21:37:22 CEST 2012

On 7/18/12, Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:
> On 18/07/2012 2:01 PM, Nicolas George wrote:
>> An error is for a situation that can happen due to external
>> circumstances,
>> even very unlikely ones: out of memory, corrupted file, etc.
>> An assert is for a situation where you are pretty sure something is true,
>> and you are absolutely sue it should be true, and you want to rely on it
>> in
>> the following code, but since the code that lead there is quite complex,
>> you
>> are not 100% sure it will actually be true. If, per chance, there is a
>> bug
>> and the assert fail, you will get an accurate error message (whereas
>> calling
>> code could just ignore the error), and even a backtrace or a core dump.
>> AVERROR_BUG is for intermediate cases.
> As I look at the code, it still seems quite possible to craft a file
> that would fall through and use st as NULL. If you think this is wrong,
> please do tell why.

It is usually done other way around, you need to provide sane
explanation why your code is needed. Explanation of sort:
"it still seems quite possilbe..." are not.

Anyway I expect that at least commit message is changed because
current one is not correct.

More information about the ffmpeg-devel mailing list