Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6b6b84ae1625ce1e38ff5f1b4c0bf03450066e66)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -120,6 +120,8 @@ static int adx_decode_frame(AVCodecContext *avctx, void *data, |
120 | 120 |
buf += header_size; |
121 | 121 |
buf_size -= header_size; |
122 | 122 |
} |
123 |
+ if(c->channels <= 0) |
|
124 |
+ return AVERROR_INVALIDDATA; |
|
123 | 125 |
|
124 | 126 |
/* calculate number of blocks in the packet */ |
125 | 127 |
num_blocks = buf_size / (BLOCK_SIZE * c->channels); |