X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fralf.c;h=831728177e94ac90af2c1fa1b5f992eecb747585;hb=d4440c7e91b0ef5f6776d98c51dbb6cd66ea0194;hp=d8f1803086f6204664a11fc11023b82e6b14febd;hpb=721624c2f67545989626ba4413f7b8dbd7dff678;p=ffmpeg diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c index d8f1803086f..831728177e9 100644 --- a/libavcodec/ralf.c +++ b/libavcodec/ralf.c @@ -60,7 +60,7 @@ typedef struct RALFContext { int filter_bits; ///< filter precision for the current channel data int32_t filter[64]; - int bias[2]; ///< a constant value added to channel data after filtering + unsigned bias[2]; ///< a constant value added to channel data after filtering int num_blocks; ///< number of blocks inside the frame int sample_offset; @@ -330,7 +330,7 @@ static void apply_lpc(RALFContext *ctx, int ch, int length, int bits) acc = (acc + bias - 1) >> ctx->filter_bits; acc = FFMAX(acc, min_clip); } else { - acc = (acc + bias) >> ctx->filter_bits; + acc = ((unsigned)acc + bias) >> ctx->filter_bits; acc = FFMIN(acc, max_clip); } audio[i] += acc;