mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
adpcm: simplify reading of IMA DK4 frame header.
This commit is contained in:
parent
8114f94ac9
commit
a57ea1a87e
@ -528,15 +528,12 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
|
|||||||
if (avctx->block_align != 0 && buf_size > avctx->block_align)
|
if (avctx->block_align != 0 && buf_size > avctx->block_align)
|
||||||
buf_size = avctx->block_align;
|
buf_size = avctx->block_align;
|
||||||
|
|
||||||
c->status[0].predictor = (int16_t)bytestream_get_le16(&src);
|
for (channel = 0; channel < avctx->channels; channel++) {
|
||||||
c->status[0].step_index = *src++;
|
cs = &c->status[channel];
|
||||||
src++;
|
cs->predictor = (int16_t)bytestream_get_le16(&src);
|
||||||
*samples++ = c->status[0].predictor;
|
cs->step_index = *src++;
|
||||||
if (st) {
|
|
||||||
c->status[1].predictor = (int16_t)bytestream_get_le16(&src);
|
|
||||||
c->status[1].step_index = *src++;
|
|
||||||
src++;
|
src++;
|
||||||
*samples++ = c->status[1].predictor;
|
*samples++ = cs->predictor;
|
||||||
}
|
}
|
||||||
while (src < buf + buf_size) {
|
while (src < buf + buf_size) {
|
||||||
uint8_t v = *src++;
|
uint8_t v = *src++;
|
||||||
|
Loading…
Reference in New Issue
Block a user