# HG changeset patch # User voroshil # Date 1191439977 0 # Node ID ad8345572a2e2efdcf58c274ff01d07b24b0e63c # Parent c5ef5e6da9c5b2d34f19d838f31f5e8b935960d2 Fix audio clicks in ADPCM IMA AMV by casting predictor as "signed short" Initialize step_index as int16_t (as multimedia wiki says). diff -r c5ef5e6da9c5 -r ad8345572a2e adpcm.c --- a/adpcm.c Wed Oct 03 17:50:27 2007 +0000 +++ b/adpcm.c Wed Oct 03 19:32:57 2007 +0000 @@ -1184,10 +1184,8 @@ break; case CODEC_ID_ADPCM_IMA_AMV: case CODEC_ID_ADPCM_IMA_SMJPEG: - c->status[0].predictor = *src; - src += 2; - c->status[0].step_index = *src++; - src++; /* skip another byte before getting to the meat */ + c->status[0].predictor = (signed short)bytestream_get_le16(&src); + c->status[0].step_index = bytestream_get_le16(&src); if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) src+=4;