aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flacdec.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/flacdec.c
parent06431f1997935b322e15e48a67cdd8714a035701 (diff)
downloadffmpeg-5e257c1f7bf8bf277144b21200f3c6ed9a077af0.tar.gz
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/flacdec.c')
-rw-r--r--libavcodec/flacdec.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index f224fa7621..d8597303a2 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -483,15 +483,14 @@ static int decode_frame(FLACContext *s)
if ( s->flac_stream_info.channels
&& fi.channels != s->flac_stream_info.channels
&& s->got_streaminfo) {
- s->flac_stream_info.channels = s->avctx->channels = fi.channels;
- ff_flac_set_channel_layout(s->avctx);
+ s->flac_stream_info.channels = fi.channels;
+ ff_flac_set_channel_layout(s->avctx, fi.channels);
ret = allocate_buffers(s);
if (ret < 0)
return ret;
}
- s->flac_stream_info.channels = s->avctx->channels = fi.channels;
- if (!s->avctx->channel_layout)
- ff_flac_set_channel_layout(s->avctx);
+ s->flac_stream_info.channels = fi.channels;
+ ff_flac_set_channel_layout(s->avctx, fi.channels);
s->ch_mode = fi.ch_mode;
if (!s->flac_stream_info.bps && !fi.bps) {