]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/motionpixels: Don't check for errors for complete VLC
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 29 Oct 2020 09:25:09 +0000 (10:25 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 24 Nov 2020 10:35:03 +0000 (11:35 +0100)
The algorithm used here always creates a complete VLC, so it is
unnecessary to check this again.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/motionpixels.c

index 4b9830fbed94281b96f2a7078809e8d50cab2453..a65250efe5a36e05f4f683f213263d6dfdd94bce 100644 (file)
@@ -195,8 +195,6 @@ static av_always_inline int mp_get_vlc(MotionPixelsContext *mp, GetBitContext *g
     int i;
 
     i = (mp->codes_count == 1) ? 0 : get_vlc2(gb, mp->vlc.table, mp->max_codes_bits, 1);
-    if (i < 0)
-        return i;
     return mp->codes[i].delta;
 }