diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-10-26 09:56:21 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-10-26 09:56:21 +0000 |
commit | 5c69a4fd682ae479f0921361b7953e6163bd3064 (patch) | |
tree | ef3d75db22e2541d2e58c76ca95795b92719b7cb /libavcodec/adpcm.c | |
parent | ca1d62f45dab68d2bcef36e5e94aea829af4fc20 (diff) | |
download | ffmpeg-streaming-5c69a4fd682ae479f0921361b7953e6163bd3064.zip ffmpeg-streaming-5c69a4fd682ae479f0921361b7953e6163bd3064.tar.gz |
fixing the remaning block-align checks
Originally committed as revision 2438 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 9965402..c86c8a7 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -648,12 +648,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, } 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 @@ static int adpcm_decode_frame(AVCodecContext *avctx, } 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]; |