diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-03-31 18:38:42 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-03-15 09:42:37 -0300 |
commit | 9ff843eb4a5ca4c82bd42c737eefbb29d5d26084 (patch) | |
tree | 999fbdde611c002644d8ed65c634763581194766 /libavformat/swfdec.c | |
parent | d38166a83247f932ae3b22f64d97726c5e066feb (diff) | |
download | ffmpeg-9ff843eb4a5ca4c82bd42c737eefbb29d5d26084.tar.gz |
swf: convert to new channel layout API
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/swfdec.c')
-rw-r--r-- | libavformat/swfdec.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index e549e4f50b..52c5e5c480 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -195,13 +195,7 @@ static AVStream *create_new_audio_stream(AVFormatContext *s, int id, int info) if (!ast) return NULL; ast->id = id; - if (info & 1) { - ast->codecpar->channels = 2; - ast->codecpar->channel_layout = AV_CH_LAYOUT_STEREO; - } else { - ast->codecpar->channels = 1; - ast->codecpar->channel_layout = AV_CH_LAYOUT_MONO; - } + av_channel_layout_default(&ast->codecpar->ch_layout, 1 + (info & 1)); ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; ast->codecpar->codec_id = ff_codec_get_id(swf_audio_codec_tags, info>>4 & 15); ffstream(ast)->need_parsing = AVSTREAM_PARSE_FULL; |