changeset 4021:56a9e98b06a7 libavcodec

Ignore blocks with no samples and flags (but usually with MD5 sum)
author kostya
date Sun, 15 Oct 2006 04:50:19 +0000
parents 723818b5de0f
children a2a174f19b34
files wavpack.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/wavpack.c	Sat Oct 14 17:04:50 2006 +0000
+++ b/wavpack.c	Sun Oct 15 04:50:19 2006 +0000
@@ -388,6 +388,7 @@
     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");