diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-05-07 07:20:32 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:41 -0300 |
commit | 5e257c1f7bf8bf277144b21200f3c6ed9a077af0 (patch) | |
tree | 300cf87cb7ee49ccd531725daf9cba479cf14343 /libavcodec/flac_parser.c | |
parent | 06431f1997935b322e15e48a67cdd8714a035701 (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.c | 7 |
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, |