comparison ac3dec.c @ 11656:e6bff5319932 libavcodec

ac3dec: return smaller of buf_size and frame_size instead of always returning frame_size.
author jbr
date Thu, 22 Apr 2010 21:43:36 +0000
parents 998691d7f8f5
children 0c98bdb71f48
comparison
equal deleted inserted replaced
11655:7ad2eb6a2f10 11656:e6bff5319932
1418 } 1418 }
1419 s->dsp.float_to_int16_interleave(out_samples, output, 256, s->out_channels); 1419 s->dsp.float_to_int16_interleave(out_samples, output, 256, s->out_channels);
1420 out_samples += 256 * s->out_channels; 1420 out_samples += 256 * s->out_channels;
1421 } 1421 }
1422 *data_size = s->num_blocks * 256 * avctx->channels * sizeof (int16_t); 1422 *data_size = s->num_blocks * 256 * avctx->channels * sizeof (int16_t);
1423 return s->frame_size; 1423 return FFMIN(buf_size, s->frame_size);
1424 } 1424 }
1425 1425
1426 /** 1426 /**
1427 * Uninitialize the AC-3 decoder. 1427 * Uninitialize the AC-3 decoder.
1428 */ 1428 */