diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c index 21af155bba..36cfba9560 100644 --- a/libavcodec/ffv1dec_template.c +++ b/libavcodec/ffv1dec_template.c @@ -98,7 +98,7 @@ static av_always_inline void RENAME(decode_line)(FFV1Context *s, int w, if (sign) diff = -diff; - sample[1][x] = av_mod_uintp2(RENAME(predict)(sample[1] + x, sample[0] + x) + diff, bits); + sample[1][x] = av_mod_uintp2(RENAME(predict)(sample[1] + x, sample[0] + x) + (SUINT)diff, bits); } s->run_index = run_index; }