1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Vittorio Giovara 2014-11-04 09:36:57 -05:00
parent 0a66647061
commit 37b3361e75

View File

@ -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) {