aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-02-23 13:11:06 -0500
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-23 21:11:36 -0500
commit7a4fb3fd9357dfdd27431a0a8d7250dab54a9938 (patch)
tree76afc13bcbf3650aa728efc843a18720987cc5fa /libavcodec
parent22f893e1c9f9387f0a021f775757130fa48e0180 (diff)
downloadffmpeg-7a4fb3fd9357dfdd27431a0a8d7250dab54a9938.tar.gz
vmdaudio: set *data_size to zero when skipping small packets and add a warning log message.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vmdav.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index b338da3904..1407c96588 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -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) {