# HG changeset patch # User kostya # Date 1160887819 0 # Node ID 56a9e98b06a74d305a47c4dbc71ccad432e1b713 # Parent 723818b5de0f0172e1e292ae97b915e90f48820a Ignore blocks with no samples and flags (but usually with MD5 sum) diff -r 723818b5de0f -r 56a9e98b06a7 wavpack.c --- 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");