summaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-10-15 04:50:19 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-10-15 04:50:19 +0000
commita8789714ba858a663d30f4676016d5bc7368c823 (patch)
treeda226846c5860ddeb6766df7c212c99e1a74f829 /libavcodec/wavpack.c
parent3d0c32d4a98172115adb60d2347d6890d810b7f8 (diff)
Ignore blocks with no samples and flags (but usually with MD5 sum)
Originally committed as revision 6694 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 53ba34b69d..5a54f7d0e2 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -388,6 +388,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx,
memset(s->decorr, 0, MAX_TERMS * sizeof(Decorr));
s->samples = LE_32(buf); buf += 4;
+ if(!s->samples) return buf_size;
/* should not happen but who knows */
if(s->samples * 2 * avctx->channels > AVCODEC_MAX_AUDIO_FRAME_SIZE){
av_log(avctx, AV_LOG_ERROR, "Packet size is too big to be handled in lavc!\n");