Commit 6b6b84ae authored by Michael Niedermayer's avatar Michael Niedermayer

adxdec: Fix division by zero

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bdd62a61
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment