changeset 1576:bc4b13ca74de libavcodec

block algn patch by ("Assaf Yaari" <assafy at mobixell dot com>)
author michael
date Sun, 26 Oct 2003 09:49:45 +0000
parents f16ae8e69bd9
children dbd0ede6623d
files adpcm.c
diffstat 1 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/adpcm.c	Sat Oct 25 21:59:28 2003 +0000
+++ b/adpcm.c	Sun Oct 26 09:49:45 2003 +0000
@@ -524,12 +524,9 @@
         }
         break;
     case CODEC_ID_ADPCM_IMA_WAV:
-        if (buf_size > BLKSIZE) {
-            if (avctx->block_align != 0)
-                buf_size = avctx->block_align;
-            else
-                buf_size = BLKSIZE;
-        }
+        if (avctx->block_align != 0 && buf_size > avctx->block_align)
+            buf_size = avctx->block_align;
+
 	// XXX: do as per-channel loop
         cs = &(c->status[0]);
         cs->predictor = (*src++) & 0x0FF;
@@ -605,13 +602,8 @@
 
         break;
     case CODEC_ID_ADPCM_MS:
-
-        if (buf_size > BLKSIZE) {
-            if (avctx->block_align != 0)
-                buf_size = avctx->block_align;
-            else
-                buf_size = BLKSIZE;
-        }
+        if (avctx->block_align != 0 && buf_size > avctx->block_align)
+            buf_size = avctx->block_align;
         n = buf_size - 7 * avctx->channels;
         if (n < 0)
             return -1;