[FFmpeg-devel] [PATCH 121/281] pmp: convert to new channel layout API

James Almer jamrial at gmail.com
Thu Jan 13 03:57:38 EET 2022


From: Vittorio Giovara <vittorio.giovara at gmail.com>

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/pmpdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c
index ce8e89515a..d63c856770 100644
--- a/libavformat/pmpdec.c
+++ b/libavformat/pmpdec.c
@@ -119,7 +119,8 @@ static int pmp_header(AVFormatContext *s)
             return AVERROR(ENOMEM);
         ast->codecpar->codec_type  = AVMEDIA_TYPE_AUDIO;
         ast->codecpar->codec_id    = audio_codec_id;
-        ast->codecpar->channels    = channels;
+        ast->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
+        ast->codecpar->ch_layout.nb_channels = channels;
         ast->codecpar->sample_rate = srate;
         avpriv_set_pts_info(ast, 32, 1, srate);
     }
-- 
2.34.1



More information about the ffmpeg-devel mailing list