diff mbox series

[FFmpeg-devel,066/281] g726: convert to new channel layout API

Message ID 20220113015101.4-67-jamrial@gmail.com
State New
Headers show
Series New channel layout API | expand

Checks

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

Commit Message

James Almer Jan. 13, 2022, 1:50 a.m. UTC
From: Anton Khirnov <anton@khirnov.net>

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/g726.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/g726.c b/libavformat/g726.c
index 4b08d0a9f7..ce88fe6b23 100644
--- a/libavformat/g726.c
+++ b/libavformat/g726.c
@@ -42,7 +42,8 @@  static int g726_read_header(AVFormatContext *s)
     st->codecpar->sample_rate           = c->sample_rate;
     st->codecpar->bits_per_coded_sample = c->code_size;
     st->codecpar->bit_rate              = ((int[]){ 16000, 24000, 32000, 40000 })[c->code_size - 2];
-    st->codecpar->channels              = 1;
+    st->codecpar->ch_layout.order       = AV_CHANNEL_ORDER_UNSPEC;
+    st->codecpar->ch_layout.nb_channels = 1;
 
     return 0;
 }