[FFmpeg-devel] [PATCH 127/281] rawenc: convert to new channel layout API
James Almer
jamrial at gmail.com
Thu Jan 13 03:57:44 EET 2022
From: Anton Khirnov <anton at khirnov.net>
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/rawenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 4bbae7717b..54a0c2fa78 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -79,7 +79,7 @@ static int adx_write_trailer(AVFormatContext *s)
if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
int64_t file_size = avio_tell(pb);
- uint64_t sample_count = (file_size - 36) / par->channels / 18 * 32;
+ uint64_t sample_count = (file_size - 36) / par->ch_layout.nb_channels / 18 * 32;
if (sample_count <= UINT32_MAX) {
avio_seek(pb, 12, SEEK_SET);
avio_wb32(pb, sample_count);
--
2.34.1
More information about the ffmpeg-devel
mailing list