[FFmpeg-cvslog] avformat/imfdec: Convert to the new channel layout API

Andreas Rheinhardt git at videolan.org
Thu Mar 17 16:06:41 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Mar 17 14:08:59 2022 +0100| [814f806e0630e5338ad0d04e24777daceafa862b] | committer: Andreas Rheinhardt

avformat/imfdec: Convert to the new channel layout API

Reviewed-by: James Almer <jamrial at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=814f806e0630e5338ad0d04e24777daceafa862b
---

 libavformat/imfdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c
index 3ce850b75a..9ec52efbc8 100644
--- a/libavformat/imfdec.c
+++ b/libavformat/imfdec.c
@@ -874,7 +874,7 @@ static int imf_read_packet(AVFormatContext *s, AVPacket *pkt)
                 int64_t nbsamples = av_rescale_q(pkt->duration,
                                                  st->time_base,
                                                  av_make_q(1, st->codecpar->sample_rate));
-                av_shrink_packet(pkt, nbsamples * st->codecpar->channels * bytes_per_sample);
+                av_shrink_packet(pkt, nbsamples * st->codecpar->ch_layout.nb_channels * bytes_per_sample);
 
             } else {
                 /* in all other cases, use side data to skip samples */



More information about the ffmpeg-cvslog mailing list