diff mbox series

[FFmpeg-devel,150/281] sol: convert to new channel layout API

Message ID 20220113020026.590-2-jamrial@gmail.com
State Accepted
Commit a6b5153df5bd6181b5e99251a7077826222fb331
Headers show
Series New channel layout API | expand

Commit Message

James Almer Jan. 13, 2022, 1:59 a.m. UTC
From: Vittorio Giovara <vittorio.giovara@gmail.com>

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/sol.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

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;