mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
wmadec: check nb_frames
Improves error message for Ticket968 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
3fac99cd9d
commit
6c6dc8ccea
@ -827,6 +827,10 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
|
||||
/* read super frame header */
|
||||
skip_bits(&s->gb, 4); /* super frame index */
|
||||
nb_frames = get_bits(&s->gb, 4) - (s->last_superframe_len <= 0);
|
||||
if (nb_frames <= 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "nb_frames is %d\n", nb_frames);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} else {
|
||||
nb_frames = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user