[Ffmpeg-cvslog] r6694 - in trunk: libavcodec/wavpack.c libavformat/wv.c

kostya subversion
Sun Oct 15 06:50:19 CEST 2006


Author: kostya
Date: Sun Oct 15 06:50:19 2006
New Revision: 6694

Modified:
   trunk/libavcodec/wavpack.c
   trunk/libavformat/wv.c

Log:
Ignore blocks with no samples and flags (but usually with MD5 sum)

Modified: trunk/libavcodec/wavpack.c
==============================================================================
--- trunk/libavcodec/wavpack.c	(original)
+++ trunk/libavcodec/wavpack.c	Sun Oct 15 06:50:19 2006
@@ -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");

Modified: trunk/libavformat/wv.c
==============================================================================
--- trunk/libavformat/wv.c	(original)
+++ trunk/libavformat/wv.c	Sun Oct 15 06:50:19 2006
@@ -118,15 +118,15 @@
     if(!wc->chan) wc->chan = chan;
     if(!wc->rate) wc->rate = rate;
 
-    if(bpp != wc->bpp){
+    if(wc->flags && bpp != wc->bpp){
         av_log(ctx, AV_LOG_ERROR, "Bits per sample differ, this block: %i, header block: %i\n", bpp, wc->bpp);
         return -1;
     }
-    if(chan != wc->chan){
+    if(wc->flags && chan != wc->chan){
         av_log(ctx, AV_LOG_ERROR, "Channels differ, this block: %i, header block: %i\n", chan, wc->chan);
         return -1;
     }
-    if(rate != wc->rate){
+    if(wc->flags && rate != wc->rate){
         av_log(ctx, AV_LOG_ERROR, "Sampling rate differ, this block: %i, header block: %i\n", rate, wc->rate);
         return -1;
     }




More information about the ffmpeg-cvslog mailing list