Test for supported number of channels

Originally committed as revision 9730 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Vitor Sessak 18 years ago
parent 586e5bd902
commit f175201004
  1. 5
      libavcodec/alac.c

@ -491,6 +491,11 @@ static int alac_decode_frame(AVCodecContext *avctx,
init_get_bits(&alac->gb, inbuffer, input_buffer_size * 8); init_get_bits(&alac->gb, inbuffer, input_buffer_size * 8);
channels = get_bits(&alac->gb, 3) + 1; 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. /* 2^result = something to do with output waiting.
* perhaps matters if we read > 1 frame in a pass? * perhaps matters if we read > 1 frame in a pass?

Loading…
Cancel
Save