summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-28 12:09:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-28 12:20:12 +0200
commitef13967e601bb0851af04182ea2aeeea8a3025bd (patch)
treee14f85be5ae38de983822f7461c753035cdf8778
parent8518da23f59d8f5a52f7c1c919f584a119484d0f (diff)
parentf13ffb6636fdecb5e3e0ddcff48f096e7b3db362 (diff)
downloadffmpeg-streaming-ef13967e601bb0851af04182ea2aeeea8a3025bd.zip
ffmpeg-streaming-ef13967e601bb0851af04182ea2aeeea8a3025bd.tar.gz
Merge commit 'f13ffb6636fdecb5e3e0ddcff48f096e7b3db362'
* commit 'f13ffb6636fdecb5e3e0ddcff48f096e7b3db362': flacdec: do not overwrite a channel layout set by the caller Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/flac.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/flac.c b/libavcodec/flac.c
index 3874b6c..c44049b 100644
--- a/libavcodec/flac.c
+++ b/libavcodec/flac.c
@@ -225,7 +225,10 @@ void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *
avctx->channels = s->channels;
avctx->sample_rate = s->samplerate;
avctx->bits_per_raw_sample = s->bps;
- ff_flac_set_channel_layout(avctx);
+
+ if (!avctx->channel_layout ||
+ av_get_channel_layout_nb_channels(avctx->channel_layout) != avctx->channels)
+ ff_flac_set_channel_layout(avctx);
s->samples = get_bits64(&gb, 36);
OpenPOWER on IntegriCloud