Browse Source

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.
tags/n2.3
Anton Khirnov 11 years ago
parent
commit
f13ffb6636
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavcodec/flac.c

+ 4
- 1
libavcodec/flac.c View File

@@ -225,7 +225,10 @@ void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *
avctx->channels = s->channels; avctx->channels = s->channels;
avctx->sample_rate = s->samplerate; avctx->sample_rate = s->samplerate;
avctx->bits_per_raw_sample = s->bps; 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_bits_long(&gb, 32) << 4; s->samples = get_bits_long(&gb, 32) << 4;
s->samples |= get_bits(&gb, 4); s->samples |= get_bits(&gb, 4);


Loading…
Cancel
Save