On 02/09/13 14:17, Luca Barbato wrote:
> On 02/09/13 11:23, Christian Schmidt wrote:
>> Submit a correct pointer to av_free() on shutdown.
> 
> Would be better split it up. it is just a small improvement.

About two lines each, I really don't see a point in splitting these up.

>> The sample buffering logic does not take into account that the blocksize
>> could change. Reset the buffer if the channel configuration  changes,
>> since if there are leftover samples, it is most likely a broken or
>> misconcatenated stream. This could lead to negative numbers for
>> missing_samples during decoding.
> 
> That one seems more serious, are you sure resetting that field is all
> you need?

Yes. If the header changes in the middle of a (wrapped) sample we have
some kind of error anyway.

> Leftover samples might be flushed before providing the actual data, but
> could be done maybe in a later patch if you are busy.

I am assuming this can not happen in "correct" streams - you would need
to have one packet to complete the data with current channel layout,
then a new poacket with a different header. Thus discarding the
fractional samples in the leftover buffer is the only sane way - padding
with 0s or other data to get sample information for all channels would
be the only alternative, and makes less sense to me.

Christian

> lu
> _______________________________________________
> libav-devel mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-devel
> 
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to