Commit b4b5e922 authored by Justin Ruggles's avatar Justin Ruggles Committed by Michael Niedermayer

vmdaudio: set *data_size to zero when skipping small packets and add a warning log message.

Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 7a4fb3fd)
parent ebed7b68
......@@ -514,8 +514,11 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx,
/* point to the start of the encoded data */
const unsigned char *p = buf + 16;
if (buf_size < 16)
if (buf_size < 16) {
av_log(avctx, AV_LOG_WARNING, "skipping small junk packet\n");
*data_size = 0;
return buf_size;
}
block_type = buf[6];
if (block_type < BLOCK_TYPE_AUDIO || block_type > BLOCK_TYPE_SILENCE) {
......
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