summaryrefslogtreecommitdiff
path: root/libavcodec/flac_parser.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-05-07 07:20:32 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:41 -0300
commit5e257c1f7bf8bf277144b21200f3c6ed9a077af0 (patch)
tree300cf87cb7ee49ccd531725daf9cba479cf14343 /libavcodec/flac_parser.c
parent06431f1997935b322e15e48a67cdd8714a035701 (diff)
flac: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/flac_parser.c')
-rw-r--r--libavcodec/flac_parser.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index cd9a2cb574..81b6f12ab3 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -628,11 +628,8 @@ 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) {
- fpc->avctx->channels = header->fi.channels;
- ff_flac_set_channel_layout(fpc->avctx);
- }
+ ff_flac_set_channel_layout(fpc->avctx, header->fi.channels);
+
fpc->avctx->sample_rate = header->fi.samplerate;
fpc->pc->duration = header->fi.blocksize;
*poutbuf = flac_fifo_read_wrap(fpc, header->offset, *poutbuf_size,