diff mbox series

[FFmpeg-devel,075/281] idcin: convert to new channel layout API

Message ID 20220113015101.4-76-jamrial@gmail.com
State Accepted
Commit f9d235f9a2f5eb409a3985a60c7a36d195d8d896
Headers show
Series New channel layout API | expand

Checks

Context Check Description
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 fail Make fate failed

Commit Message

James Almer Jan. 13, 2022, 1:50 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/idcin.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index b7402107da..c92ed2c237 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -218,9 +218,7 @@  static int idcin_read_header(AVFormatContext *s)
         idcin->audio_stream_index = st->index;
         st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codecpar->codec_tag = 1;
-        st->codecpar->channels = channels;
-        st->codecpar->channel_layout = channels > 1 ? AV_CH_LAYOUT_STEREO :
-                                                      AV_CH_LAYOUT_MONO;
+        av_channel_layout_default(&st->codecpar->ch_layout, channels);
         st->codecpar->sample_rate = sample_rate;
         st->codecpar->bits_per_coded_sample = bytes_per_sample * 8;
         st->codecpar->bit_rate = sample_rate * bytes_per_sample * 8 * channels;