[FFmpeg-cvslog] avcodec/rka: fix channel value initialization

Paul B Mahol git at videolan.org
Wed Feb 15 15:17:43 EET 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Feb 15 14:11:16 2023 +0100| [05b859af35ef4effa1a70b363f81834d6c5abbc8] | committer: Paul B Mahol

avcodec/rka: fix channel value initialization

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

 libavcodec/rka.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/rka.c b/libavcodec/rka.c
index da4ca52f35..4c93caefff 100644
--- a/libavcodec/rka.c
+++ b/libavcodec/rka.c
@@ -149,7 +149,8 @@ static av_cold int rka_decode_init(AVCodecContext *avctx)
         return AVERROR_INVALIDDATA;
     }
 
-    s->channels = avctx->ch_layout.nb_channels;
+    av_channel_layout_uninit(&avctx->ch_layout);
+    s->channels = avctx->ch_layout.nb_channels = avctx->extradata[12];
     if (s->channels < 1 || s->channels > 2)
         return AVERROR_INVALIDDATA;
 



More information about the ffmpeg-cvslog mailing list