[FFmpeg-devel] [PATCH 130/281] rl2: convert to new channel layout API
James Almer
jamrial at gmail.com
Thu Jan 13 03:57:47 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/rl2.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index 6a559c7294..7b4b8d0ba7 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -147,12 +147,13 @@ static av_cold int rl2_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
st->codecpar->codec_tag = 1;
- st->codecpar->channels = channels;
+ st->codecpar->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
+ st->codecpar->ch_layout.nb_channels = channels;
st->codecpar->bits_per_coded_sample = 8;
st->codecpar->sample_rate = rate;
- st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate *
+ st->codecpar->bit_rate = channels * st->codecpar->sample_rate *
st->codecpar->bits_per_coded_sample;
- st->codecpar->block_align = st->codecpar->channels *
+ st->codecpar->block_align = channels *
st->codecpar->bits_per_coded_sample / 8;
avpriv_set_pts_info(st,32,1,rate);
}
--
2.34.1
More information about the ffmpeg-devel
mailing list