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