1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avcodec/wmaprodec: unbreak old xma2 decoding

This commit is contained in:
Paul B Mahol
2021-09-03 20:08:04 +02:00
parent e204846ec1
commit 584cd16ad0

View File

@@ -1955,7 +1955,7 @@ static av_cold int xma_decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
/* get stream config */ /* get stream config */
if (avctx->codec_id == AV_CODEC_ID_XMA2 && avctx->extradata_size >= 34) { /* XMA2WAVEFORMATEX */ if (avctx->codec_id == AV_CODEC_ID_XMA2 && avctx->extradata_size == 34) { /* XMA2WAVEFORMATEX */
s->num_streams = AV_RL16(avctx->extradata); s->num_streams = AV_RL16(avctx->extradata);
avctx->channel_layout = AV_RL32(avctx->extradata + 2); avctx->channel_layout = AV_RL32(avctx->extradata + 2);
} else if (avctx->codec_id == AV_CODEC_ID_XMA2 && avctx->extradata_size >= 2) { /* XMA2WAVEFORMAT */ } else if (avctx->codec_id == AV_CODEC_ID_XMA2 && avctx->extradata_size >= 2) { /* XMA2WAVEFORMAT */