adpcm: fix division by zero in fate/creative/intro-partial.wav with -s 2 and -r 0.001:1

Bug-Found-by: Shitiz Garg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-12-10 14:55:23 +01:00
parent 337ce558b6
commit 257c85cddd

View File

@ -340,6 +340,9 @@ static int get_nb_samples(AVCodecContext *avctx, const uint8_t *buf,
*coded_samples = 0;
if(ch <= 0)
return 0;
switch (avctx->codec->id) {
/* constant, only check buf_size */
case CODEC_ID_ADPCM_EA_XAS: