summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2012-03-29 12:08:07 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2012-03-29 19:08:05 +0200
commita05c41acd1e2dc0b7f6d82fa5ecbf7b8b5514ebc (patch)
treeff4ad0cce9c184a51c0a9bf5842778d00b6784c9 /libavcodec/mpegaudiodec.c
parentf704eb612b3333a589d83741e07bfbdf1cffb8cb (diff)
downloadffmpeg-a05c41acd1e2dc0b7f6d82fa5ecbf7b8b5514ebc.tar.gz
mp3dec: perform I/S and M/S only when frame mode is joint stereo.
Looks like some LAME versions produce dual stereo mode MP3s with flags for intensity and middle stereo set. In this mode those flags should be ignored like the reference decoder and derived ones do.
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 6ed124b5f1..0ab87e1a96 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1533,7 +1533,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
huffman_decode(s, g, exponents, bits_pos + g->part2_3_length);
} /* ch */
- if (s->nb_channels == 2)
+ if (s->mode == MPA_JSTEREO)
compute_stereo(s, &s->granules[0][gr], &s->granules[1][gr]);
for (ch = 0; ch < s->nb_channels; ch++) {