diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-12-16 20:02:39 +0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-12-22 10:35:28 +0400 |
commit | aef5150719f03ce87e67c17d2006e24d8961aa17 (patch) | |
tree | 8ac0aef0807bf331b17647f17dae5cfe864b4e0f /libavcodec/flacdec.c | |
parent | 9378be9f3252bfa6970405c235c776df3f75533a (diff) |
flac: only set channel layout if not previously set or on channel count change
Fixes Bug 402
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r-- | libavcodec/flacdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index fd47929c50..51fd19628c 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -426,7 +426,8 @@ static int decode_frame(FLACContext *s) return ret; } s->channels = s->avctx->channels = fi.channels; - ff_flac_set_channel_layout(s->avctx); + if (!s->avctx->channel_layout && s->channels <= 6) + ff_flac_set_channel_layout(s->avctx); s->ch_mode = fi.ch_mode; if (!s->bps && !fi.bps) { |