[Ffmpeg-devel] QDM2

Måns Rullgård mru
Sun Oct 23 15:06:22 CEST 2005


Rich Felker <dalias at aerifal.cx> writes:

> On Sun, Oct 23, 2005 at 08:57:07AM +0200, Steve Lhomme wrote:
>> Michael Niedermayer wrote:
>> >Hi
>> >
>> >On Thu, Oct 20, 2005 at 12:32:54AM +0200, Roberto Togni wrote:
>> >[...]
>> >
>> >>About the other patch, i'd like to have Michael opinion about it, since
>> >>get_bit() can be performance critical (even if that code should be
>> >>harmless if assert is not enabled)
>> >
>> >
>> >hmm, iam not sure what the purpose of the change is but failing asserts
>> >due to damaged/truncated streams seems like bad behavior ...
>> 
>> You should know that asserts only occur in debug builds (-g option), not 
>>  in release builds. So asserts will only happen for developpers, which 
>> are the people who should notice (as quickly as possible) such ugliness.
>
> ffmpeg policy seems to be that assert is ONLY for conditions that
> indicate a bug/inconsistency in the actual code, not for broken
> bitstreams and such.

I'm not opposed to a feature with optional extra checks resulting in
asserts, if it helps debug something, as long as this does not impact
the code when the checks are disabled.

> BTW AFAIK assert is always enabled unless you #define NDEBUG
> manually..

Correct.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list