Consider data as invalid if ff_wma_run_level_decode gets out with an error.
It avoids an unpleasant sound distorsion. See http://trac.ffmpeg.org/ticket/9358 --- libavcodec/wmadec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index d627bbe50e..74ea8cea77 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -606,10 +606,11 @@ static int wma_decode_block(WMACodecContext *s) * there is potentially less energy there */ tindex = (ch == 1 && s->ms_stereo); memset(ptr, 0, s->block_len * sizeof(WMACoef)); - ff_wma_run_level_decode(s->avctx, &s->gb, &s->coef_vlc[tindex], + if (ff_wma_run_level_decode(s->avctx, &s->gb, &s->coef_vlc[tindex], s->level_table[tindex], s->run_table[tindex], 0, ptr, 0, nb_coefs[ch], - s->block_len, s->frame_len_bits, coef_nb_bits); + s->block_len, s->frame_len_bits, coef_nb_bits)) + return AVERROR_INVALIDDATA; } if (s->version == 1 && s->avctx->channels >= 2) align_get_bits(&s->gb); -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".