Justin Ruggles <justin.rugg...@gmail.com> writes:

> Should fix fate-acodec-adpcm-ima_wav with several compilers.
> ---
>  libavcodec/adpcmenc.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
> index 5c95ad7..f81d7fd 100644
> --- a/libavcodec/adpcmenc.c
> +++ b/libavcodec/adpcmenc.c
> @@ -537,8 +537,9 @@ static int adpcm_encode_frame(AVCodecContext *avctx, 
> AVPacket *avpkt,
>                      ADPCMChannelStatus *status = &c->status[ch];
>                      const int16_t *smp = &samples_p[ch][1 + i * 8];
>                      for (j = 0; j < 8; j += 2) {
> -                        *dst++ = adpcm_ima_compress_sample(status, smp[j    
> ]) |
> -                                (adpcm_ima_compress_sample(status, smp[j + 
> 1]) << 4);
> +                        uint8_t v = adpcm_ima_compress_sample(status, smp[j  
>   ]);
> +                        v        |= adpcm_ima_compress_sample(status, smp[j 
> + 1]) << 4;
> +                        *dst++ = v;
>                      }
>                  }
>              }
> -- 

LGTM

-- 
Måns Rullgård
m...@mansr.com
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to