Commit 4caf8c51 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'b26742cc'

* commit 'b26742cc':
  shorten: Break out of loop looking for fmt chunk if none is found

See: 5e9a56a0Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a44d35d9 b26742cc
...@@ -227,9 +227,11 @@ static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header, ...@@ -227,9 +227,11 @@ static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header,
while (bytestream2_get_le32(&gb) != MKTAG('f', 'm', 't', ' ')) { while (bytestream2_get_le32(&gb) != MKTAG('f', 'm', 't', ' ')) {
len = bytestream2_get_le32(&gb); len = bytestream2_get_le32(&gb);
if (len<0 || bytestream2_get_bytes_left(&gb) - 8 < len)
return AVERROR_INVALIDDATA;
bytestream2_skip(&gb, len); bytestream2_skip(&gb, len);
if (len < 0 || bytestream2_get_bytes_left(&gb) < 16) {
av_log(avctx, AV_LOG_ERROR, "no fmt chunk found\n");
return AVERROR_INVALIDDATA;
}
} }
len = bytestream2_get_le32(&gb); len = bytestream2_get_le32(&gb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment