diff options
author | Assaf Yaari <assafy@mobixell.com> | 2003-10-26 09:49:45 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-10-26 09:49:45 +0000 |
commit | ca1d62f45dab68d2bcef36e5e94aea829af4fc20 (patch) | |
tree | 4a24512fa39ed084e34ba6a1669cae7642c6c21a /libavcodec/adpcm.c | |
parent | 6e0593e80b30d9225e1adba32f7dfccddf2fffb0 (diff) | |
download | ffmpeg-streaming-ca1d62f45dab68d2bcef36e5e94aea829af4fc20.zip ffmpeg-streaming-ca1d62f45dab68d2bcef36e5e94aea829af4fc20.tar.gz |
block algn patch by ("Assaf Yaari" <assafy at mobixell dot com>)
Originally committed as revision 2437 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index a6ecaf5..9965402 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -524,12 +524,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, } 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 @@ static int adpcm_decode_frame(AVCodecContext *avctx, 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; |