diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2007-07-18 06:45:47 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2007-07-18 06:45:47 +0000 |
commit | f1752010048845518d45eb35cb2ebc827b139280 (patch) | |
tree | 9d973314baab3efb5e9df287b6db3807d96da6fb /libavcodec/alac.c | |
parent | 586e5bd902dd8b35500f061ec71af5f2c9b3d754 (diff) | |
download | ffmpeg-f1752010048845518d45eb35cb2ebc827b139280.tar.gz |
Test for supported number of channels
Originally committed as revision 9730 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alac.c')
-rw-r--r-- | libavcodec/alac.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c index fac8a83025..3883f418f4 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -491,6 +491,11 @@ static int alac_decode_frame(AVCodecContext *avctx, init_get_bits(&alac->gb, inbuffer, input_buffer_size * 8); channels = get_bits(&alac->gb, 3) + 1; + if (channels > MAX_CHANNELS) { + av_log(avctx, AV_LOG_ERROR, "channels > %d not supported\n", + MAX_CHANNELS); + return input_buffer_size; + } /* 2^result = something to do with output waiting. * perhaps matters if we read > 1 frame in a pass? |