mpegaudio: convert to new channel layout API

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Anton Khirnov
2019-05-29 09:36:27 +02:00
committed by James Almer
parent a96c94bbd8
commit 53d25983bf
6 changed files with 26 additions and 13 deletions
+2 -1
View File
@@ -84,7 +84,8 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
if (s->header_count > header_threshold) {
avctx->sample_rate= sr;
avctx->channels = channels;
av_channel_layout_uninit(&avctx->ch_layout);
av_channel_layout_default(&avctx->ch_layout, channels);
s1->duration = frame_size;
avctx->codec_id = codec_id;
if (s->no_bitrate || !avctx->bit_rate) {