diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-09-10 14:21:39 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-09-29 16:54:01 -0400 |
commit | ba5d2890d735961f1e4e8484082287a552cad699 (patch) | |
tree | d4d0f4e68fccf5ce9575f127d90b55ec7f94b4b5 /libavcodec/adpcm.c | |
parent | 5c9eb4fabbefd4ebb02620a0a3a6e10032ec069d (diff) | |
download | ffmpeg-ba5d2890d735961f1e4e8484082287a552cad699.tar.gz |
adpcm: simplify reading of Funcom ISS frame header.
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 80dc7ca1d8..e4e0627542 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -593,13 +593,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, } break; case CODEC_ID_ADPCM_IMA_ISS: - c->status[0].predictor = (int16_t)AV_RL16(src + 0); - c->status[0].step_index = src[2]; - src += 4; - if(st) { - c->status[1].predictor = (int16_t)AV_RL16(src + 0); - c->status[1].step_index = src[2]; - src += 4; + for (channel = 0; channel < avctx->channels; channel++) { + cs = &c->status[channel]; + cs->predictor = (int16_t)bytestream_get_le16(&src); + cs->step_index = *src++; + src++; } while (src < buf + buf_size) { |