diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-02-15 14:11:16 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-02-15 14:16:49 +0100 |
commit | 05b859af35ef4effa1a70b363f81834d6c5abbc8 (patch) | |
tree | 091e9660842ac7482fcf4506e0efe7588b5e2ffd /libavcodec | |
parent | 83a2007f40fdf70e3eb49bd5be6a46c8d223b3df (diff) | |
download | ffmpeg-05b859af35ef4effa1a70b363f81834d6c5abbc8.tar.gz |
avcodec/rka: fix channel value initialization
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/rka.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |