OSDN Git Service

nellymoserdec: Allow using unusual input block sizes
authorMartin Storsjö <martin@martin.st>
Mon, 14 Jun 2010 12:34:55 +0000 (12:34 +0000)
committerMartin Storsjö <martin@martin.st>
Mon, 14 Jun 2010 12:34:55 +0000 (12:34 +0000)
Originally committed as revision 23602 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/nellymoserdec.c

index 82a3f07..cda8d11 100644 (file)
@@ -178,8 +178,12 @@ static int decode_tag(AVCodecContext * avctx,
         case 512:   // 44100Hz
             blocks = 8; break;
         default:
+            if (buf_size % 64) {
             av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
             return buf_size;
+            }
+            blocks = buf_size / 64;
+            break;
     }
 
     for (i=0 ; i<blocks ; i++) {