Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-22 16:25:53 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-12-22 16:25:53 +0400
commit98256622a66ebda8f07bb725419c35bb8aa7e01b (patch)
tree76f39fe2fbf9c91a5fbb8a55251e36ebf55121a8 /libavcodec/flac_parser.c
parent3f72dbe4620716113754d06b7ffd558e56d1585f (diff)
parentaef5150719f03ce87e67c17d2006e24d8961aa17 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: flac: only set channel layout if not previously set or on channel count change prepare 9_beta3 release Conflicts: RELEASE Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flac_parser.c')
-rw-r--r--libavcodec/flac_parser.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index 7d3c5c4973..52ec1ee683 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -457,9 +457,12 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf,
check_header_mismatch(fpc, header, child, 0);
}
+ if (header->fi.channels != fpc->avctx->channels ||
+ (!fpc->avctx->channel_layout && header->fi.channels <= 6)) {
+ fpc->avctx->channels = header->fi.channels;
+ ff_flac_set_channel_layout(fpc->avctx);
+ }
fpc->avctx->sample_rate = header->fi.samplerate;
- fpc->avctx->channels = header->fi.channels;
- ff_flac_set_channel_layout(fpc->avctx);
fpc->pc->duration = header->fi.blocksize;
*poutbuf = flac_fifo_read_wrap(fpc, header->offset, *poutbuf_size,
&fpc->wrap_buf,