changeset 1577:dbd0ede6623d libavcodec

fixing the remaning block-align checks
author michael
date Sun, 26 Oct 2003 09:56:21 +0000
parents bc4b13ca74de
children 6a4cfc5f9f96
files adpcm.c
diffstat 1 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/adpcm.c	Sun Oct 26 09:49:45 2003 +0000
+++ b/adpcm.c	Sun Oct 26 09:56:21 2003 +0000
@@ -648,12 +648,9 @@
         }
         break;
     case CODEC_ID_ADPCM_IMA_DK4:
-        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;
+
         c->status[0].predictor = (src[0] | (src[1] << 8));
         c->status[0].step_index = src[2];
         src += 4;
@@ -687,12 +684,9 @@
         }
         break;
     case CODEC_ID_ADPCM_IMA_DK3:
-        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;
+
         c->status[0].predictor = (src[10] | (src[11] << 8));
         c->status[1].predictor = (src[12] | (src[13] << 8));
         c->status[0].step_index = src[14];