From: Justin Ruggles Date: Sun, 22 Mar 2009 21:13:10 +0000 (+0000) Subject: 10l: don't check against current layout until after validating ch_mode. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=492cc392fa518aa211fdee5eadb1f5439f45b47d;p=ffmpeg 10l: don't check against current layout until after validating ch_mode. should have been in last commit. Originally committed as revision 18154 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index eea2b0e0948..80701f188b5 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -495,7 +495,7 @@ static int decode_frame(FLACContext *s) /* channels and decorrelation */ ch_mode = get_bits(gb, 4); - if (ch_mode < FLAC_MAX_CHANNELS && s->channels == ch_mode+1) { + if (ch_mode < FLAC_MAX_CHANNELS) { channels = ch_mode + 1; ch_mode = FLAC_CHMODE_INDEPENDENT; } else if (ch_mode <= FLAC_CHMODE_MID_SIDE) {