Commit 37b3361e authored by Vittorio Giovara's avatar Vittorio Giovara

mpeg12enc: factor out check in encode_dc

Makes coverity less confused and the code more readable.

CC: libav-stable@libav.org
Bug-Id: CID 751744
parent 0a666470
......@@ -546,7 +546,8 @@ static void mpeg1_encode_motion(MpegEncContext *s, int val, int f_or_b_code)
static inline void encode_dc(MpegEncContext *s, int diff, int component)
{
if (((unsigned) (diff + 255)) >= 511) {
unsigned int diff_u = diff + 255;
if (diff_u >= 511) {
int index;
if (diff < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment