From 90fcac0e95b7d266c148a86506f301a2072d9de3 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 21 Oct 2012 17:02:28 -0400 Subject: flacdec: allow mid-stream channel layout change Although the libFLAC decoder cannot handle such a change, it is allowed by the spec and could potentially occur with live streams. --- libavcodec/flac_parser.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavcodec/flac_parser.c') diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 6c8c04675c..f0a37f310e 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -459,6 +459,7 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf, 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, -- cgit v1.2.3