[FFmpeg-devel] [PATCH] avcodec/adpcm: pick correct step_index for IMA AMV

James Almer jamrial at gmail.com
Thu May 19 16:49:01 CEST 2016


On 5/19/2016 11:43 AM, Paul B Mahol wrote:
> Hi,
> 
> patch attached.
> 
> 
> 0001-avcodec-adpcm-pick-correct-step_index-for-IMA-AMV.patch
> 
> 
> From 78dc1f23509f59e64adbc0a4ecf2e6b77581e375 Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <onemda at gmail.com>
> Date: Thu, 19 May 2016 16:40:07 +0200
> Subject: [PATCH] avcodec/adpcm: pick correct step_index for IMA AMV
> 
> Fixes #5538
> 
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavcodec/adpcm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
> index 0b6b92e..ac74318 100644
> --- a/libavcodec/adpcm.c
> +++ b/libavcodec/adpcm.c
> @@ -1310,8 +1310,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
>          break;
>      case AV_CODEC_ID_ADPCM_IMA_AMV:
>          c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
> -        c->status[0].step_index = bytestream2_get_le16u(&gb);
> -        bytestream2_skipu(&gb, 4);
> +        c->status[0].step_index = bytestream2_get_byteu(&gb);
> +        bytestream2_skipu(&gb, 5);
>          if (c->status[0].step_index > 88u) {
>              av_log(avctx, AV_LOG_ERROR, "ERROR: step_index = %i\n",
>                     c->status[0].step_index);

No fate change? Coverage shows this code is tested.


More information about the ffmpeg-devel mailing list