summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/sonic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 34d2952e69..219412eb77 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -473,7 +473,7 @@ static int predictor_calc_error(int *k, int *state, int order, int error)
{
int k_value = *k_ptr, state_value = *state_ptr;
x -= shift_down(k_value * state_value, LATTICE_SHIFT);
- state_ptr[1] = state_value + shift_down(k_value * x, LATTICE_SHIFT);
+ state_ptr[1] = state_value + shift_down(k_value * (unsigned)x, LATTICE_SHIFT);
}
#else
for (i = order-2; i >= 0; i--)