quartz: Parse audio packets in mpeg splitter to obtain the duration

Maarten Lankhorst m.b.lankhorst at gmail.com
Sat Mar 22 18:21:58 CDT 2008


Hello Alexandre,

2008/3/22, Alexandre Julliard <julliard at winehq.org>:

> "Maarten Lankhorst" <m.b.lankhorst at gmail.com> writes:
>
>  > +    /* Destination sample should contain no data! But the source sample should */
>  > +    assert(!dlen);
>  > +    assert(*flen);
>
>  Are all these asserts really internal code invariants?  It seems to me
>  they could be triggered by invalid input data, and in that case an
>  assert is not the appropriate response.

They are invariants as far as I know, even with corrupt data. Source
sample has a value because that is the condition of the while loop.
The destination sample is empty because the loop makes the length zero
before handing it over. If it somehow had a length larger or equal to
4 (less then 4 is possible and handled) there is something seriously
wrong in the handling code since this should not happen, even in
invalid input.

Cheers,

Maarten.



More information about the wine-devel mailing list