Unified · Split
| @@ -1690,6 +1690,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, · 1689 unmodified lines | ||
| 1690 | 1690 | case AV_CODEC_ID_ADPCM_IMA_AMV: |
| 1691 | 1691 | av_assert0(avctx->channels == 1); |
| 1692 | 1692 | |
| 1693 | + /* | |
| 1694 | + * Header format: | |
| 1695 | + * int16_t predictor; | |
| 1696 | + * uint8_t step_index; | |
| 1697 | + * uint8_t reserved; | |
| 1698 | + * uint32_t frame_size; | |
| 1699 | + * | |
| 1700 | + * Some implementations have step_index as 16-bits, but others | |
| 1701 | + * only use the lower 8 and store garbage in the upper 8. | |
| 1702 | + */ | |
| 1693 | 1703 | c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); |
| 1694 | 1704 | c->status[0].step_index = bytestream2_get_byteu(&gb); |
| 1695 | 1705 | bytestream2_skipu(&gb, 5); |