Perform validity check on AVFormatContext.channels instead of uninitialised field. This fixes issue 2001.
Unified · Split
| @@ -85,8 +85,8 @@ static av_cold int decode_init(AVCodecContext *avctx) · 84 unmodified lines | |||
| 85 | } | 85 | } |
| 86 | s->frame_len = 1 << frame_len_bits; | 86 | s->frame_len = 1 << frame_len_bits; |
| 87 | 87 | ||
| 88 | if (s->channels > MAX_CHANNELS) { | 88 | if (avctx->channels > MAX_CHANNELS) { |
| 89 | av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels); | 89 | av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", avctx->channels); |
| 90 | return -1; | 90 | return -1; |
| 91 | } | 91 | } |
| 92 | 92 | ||