[FFmpeg-devel] [PATCH 101/281] mpeg: convert to new channel layout API

James Almer jamrial at gmail.com
Thu Jan 13 03:55:54 EET 2022


From: Anton Khirnov <anton at khirnov.net>

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/mpeg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index ca15d9f241..34c1b74a4e 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -621,8 +621,7 @@ skip:
     st->codecpar->codec_id   = codec_id;
     if (   st->codecpar->codec_id == AV_CODEC_ID_PCM_MULAW
         || st->codecpar->codec_id == AV_CODEC_ID_PCM_ALAW) {
-        st->codecpar->channels = 1;
-        st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
+        st->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
         st->codecpar->sample_rate = 8000;
     }
     sti->request_probe = request_probe;
-- 
2.34.1



More information about the ffmpeg-devel mailing list