1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-27 23:43:28 +02:00

avcodec/rka: fix channel value initialization

This commit is contained in:
Paul B Mahol 2023-02-15 14:11:16 +01:00
parent 83a2007f40
commit 05b859af35

View File

@ -149,7 +149,8 @@ static av_cold int rka_decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA; 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) if (s->channels < 1 || s->channels > 2)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;