aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/adx.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-04 01:12:34 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-04 01:12:34 +0100
commitad1c8dd6734f0aa7a7a87b4669a166715c114b46 (patch)
treec03c08f30bf1a7e8d9859abc48de3391bb05c6a0 /libavcodec/adx.c
parentd6da16dca5a64ed7ab2db54710a0c703f179d3ba (diff)
parentfd16f567987524a769d5d4f1f69089f000386ac2 (diff)
downloadffmpeg-ad1c8dd6734f0aa7a7a87b4669a166715c114b46.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: fate: add dxtory test adx_parser: rewrite. adxdec: Validate channel count to fix a division by zero. adxdec: Do not require extradata. cmdutils: K&R reformatting cosmetics alacdec: implement the 2-pass prediction type. alacenc: implement the 2-pass prediction type. alacenc: do not generate invalid multi-channel ALAC files alacdec: fill in missing or guessed info about the extradata format. utvideo: proper median prediction for interlaced videos lavu: bump lavu minor for av_popcount64 dca: K&R formatting cosmetics dct: K&R formatting cosmetics lavf: flush decoders in avformat_find_stream_info(). win32: detect number of CPUs using affinity Add av_popcount64 snow: Restore three mistakenly removed casts. Conflicts: cmdutils.c doc/APIchanges libavcodec/adx_parser.c libavcodec/adxdec.c libavcodec/alacenc.c libavutil/avutil.h tests/fate/screen.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adx.c')
-rw-r--r--libavcodec/adx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adx.c b/libavcodec/adx.c
index aa90fd89c3..1e5d89c991 100644
--- a/libavcodec/adx.c
+++ b/libavcodec/adx.c
@@ -58,7 +58,7 @@ int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
/* channels */
avctx->channels = buf[7];
- if (avctx->channels > 2)
+ if (avctx->channels <= 0 || avctx->channels > 2)
return AVERROR_INVALIDDATA;
/* sample rate */