adxdec: Fix division by zero

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 13 years ago
parent bdd62a615a
commit 6b6b84ae16
  1. 2
      libavcodec/adxdec.c

@ -120,6 +120,8 @@ static int adx_decode_frame(AVCodecContext *avctx, void *data,
buf += header_size;
buf_size -= header_size;
}
if(c->channels <= 0)
return AVERROR_INVALIDDATA;
/* calculate number of blocks in the packet */
num_blocks = buf_size / (BLOCK_SIZE * c->channels);

Loading…
Cancel
Save