Commit f13ffb66 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

flacdec: do not overwrite a channel layout set by the caller

The channel layout mask for non-standard layouts is typically stored at
the container level (as a vorbiscomment tag) for FLAC.
parent 9767d7c0
......@@ -225,6 +225,9 @@ 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;
if (!avctx->channel_layout ||
av_get_channel_layout_nb_channels(avctx->channel_layout) != avctx->channels)
s->samples = get_bits_long(&gb, 32) << 4;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment