[FFmpeg-soc] [soc]: r5121 - als/alsdec.c

Thilo Borgmann thilo.borgmann at googlemail.com
Sat Aug 15 14:20:47 CEST 2009


>> -        // Do not continue in case of a damaged stream
>> +        // do not continue in case of a damaged stream since
>> +        // block_length must be evenly divisible by sub_blocks
>>          if (block_length % sub_blocks)
>>              return -1;
> 
> Wouldn't it be nicer to print a warning and just decrease block_length
> to the next smaller multiple of sub_blocks? Depending on how the
> format is this might improve decoding of damaged streams (e.g. last
> block in an incomplete file).

I agree a warning makes absolute sense here. I will add it later if no
one else intervene here.

The other thing would have to be elaborated. My first impression is that
it would make sense for the very last block only. Otherwise the rest of
the frame would be misdecoded. And I don't know enough about the
demuxer... if it would be able to pass the next frame in such a case
although block length has changed (less bits decoded)?

Thanks again!

Thilo


More information about the FFmpeg-soc mailing list