From a6b5153df5bd6181b5e99251a7077826222fb331 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 31 Mar 2017 18:35:41 +0200 Subject: [PATCH] sol: convert to new channel layout API Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavformat/sol.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/sol.c b/libavformat/sol.c index 42498492b6..b92cfb36fe 100644 --- a/libavformat/sol.c +++ b/libavformat/sol.c @@ -113,9 +113,7 @@ static int sol_read_header(AVFormatContext *s) st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; st->codecpar->codec_tag = id; st->codecpar->codec_id = codec; - st->codecpar->channels = channels; - st->codecpar->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO : - AV_CH_LAYOUT_STEREO; + av_channel_layout_default(&st->codecpar->ch_layout,channels); st->codecpar->sample_rate = rate; avpriv_set_pts_info(st, 64, 1, rate); return 0;