On Sat, Aug 15, 2009 at 01:33:24PM +0200, thilo.borgmann wrote: > Author: thilo.borgmann > Date: Sat Aug 15 13:33:24 2009 > New Revision: 5121 > > Log: > Elaborate comment about aborting in case of a damaged stream. > > Modified: > als/alsdec.c > > Modified: als/alsdec.c > ============================================================================== > --- als/alsdec.c Sat Aug 15 13:28:10 2009 (r5120) > +++ als/alsdec.c Sat Aug 15 13:33:24 2009 (r5121) > @@ -518,7 +518,8 @@ static int read_block_data(ALSDecContext > else > sub_blocks = get_bits1(gb) ? 4 : 1; > > - // 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). _______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
