[FFmpeg-devel] [PATCH 124/281] pvf: convert to new channel layout API
James Almer
jamrial at gmail.com
Thu Jan 13 03:57:41 EET 2022
From: Anton Khirnov <anton at khirnov.net>
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/pvfdec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavformat/pvfdec.c b/libavformat/pvfdec.c
index 7205b0b37d..1654bcbc83 100644
--- a/libavformat/pvfdec.c
+++ b/libavformat/pvfdec.c
@@ -54,11 +54,12 @@ static int pvf_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codecpar->channels = channels;
+ st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
+ st->codecpar->ch_layout.nb_channels = channels;
st->codecpar->sample_rate = sample_rate;
st->codecpar->codec_id = ff_get_pcm_codec_id(bps, 0, 1, 0xFFFF);
st->codecpar->bits_per_coded_sample = bps;
- st->codecpar->block_align = bps * st->codecpar->channels / 8;
+ st->codecpar->block_align = bps * st->codecpar->ch_layout.nb_channels / 8;
avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate);
--
2.34.1
More information about the ffmpeg-devel
mailing list