[FFmpeg-cvslog] vmdaudio: set *data_size to zero when skipping small packets and add a warning log message .
Justin Ruggles
git
Sat Feb 26 04:51:52 CET 2011
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Wed Feb 23 13:11:06 2011 -0500| [b4b5e92286bcb16d74520aab6a78e5696ebe6ef1] | committer: Michael Niedermayer
vmdaudio: set *data_size to zero when skipping small packets and add a warning log message.
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
(cherry picked from commit 7a4fb3fd9357dfdd27431a0a8d7250dab54a9938)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4b5e92286bcb16d74520aab6a78e5696ebe6ef1
---
libavcodec/vmdav.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index b338da3..1407c96 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) {
More information about the ffmpeg-cvslog
mailing list