[Ffmpeg-devel] [PATCH] Add fact chunk to non-PCM wav

Michael Niedermayer michaelni
Mon Feb 12 16:45:43 CET 2007


Hi

On Mon, Feb 12, 2007 at 04:20:51PM +0100, Michel Bardiaux wrote:
> Michael Niedermayer wrote:
> >Hi
> >
> [snip]
> 
> >>>>BTW I feel that the 'assert' should be hunted down even more
> >>>>ruthlessly as the dprintf. What do you think?
> >>>some asserts are inappropriate they surely should be hunted down,
> >>>others are valid and should not
> >>I meant 'hunt assert to replace it by if+av_log+appropriate rror 
> >>return'. Most people 'configure' in such a way that 'assert' is a
> >>nop.
> >
> >and correct asserts should never be false so a nop is all fine of
> >course one checking function parameters from exported functions is
> >not correct ...
> 
> I dont understand you at all, which is usually a sign I should let the 
> matters percolate through my dura mater for a few millenia...

an example of a correct assert() which should not be replaced is

if(is_prime(i)){
    assert(i>1);
    array[i-2]= 1;
}

the truth return of a primality checking function gurantees that i must be
larger then 1 as there is no prime smaller or equal to 1, the assert() here
just checks that is_prime() which might be a very complex and hard to
understand function is working correctly thus the assert() is only usefull
for debuging and testing is_prime() but isnt really that usefull for non
debug builds

[...]

and patch looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070212/8b257c62/attachment.pgp>



More information about the ffmpeg-devel mailing list