[FFmpeg-cvslog] r10657 - trunk/libavcodec/adpcm.c
Rich Felker
dalias
Thu Oct 4 04:49:15 CEST 2007
On Wed, Oct 03, 2007 at 09:32:57PM +0200, voroshil wrote:
> Author: voroshil
> Date: Wed Oct 3 21:32:57 2007
> New Revision: 10657
>
> Log:
> Fix audio clicks in ADPCM IMA AMV by casting predictor as "signed short"
> Initialize step_index as int16_t (as multimedia wiki says).
>
>
>
> Modified:
> trunk/libavcodec/adpcm.c
>
> Modified: trunk/libavcodec/adpcm.c
> ==============================================================================
> --- trunk/libavcodec/adpcm.c (original)
> +++ trunk/libavcodec/adpcm.c Wed Oct 3 21:32:57 2007
> @@ -1184,10 +1184,8 @@ static int adpcm_decode_frame(AVCodecCon
> 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);
The signed keyword is useless here, and int16_t would be better if
that's what you mean...
Rich
More information about the ffmpeg-cvslog
mailing list