]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/speedhq: Don't pretend reading DC can fail
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 12 Oct 2020 02:08:07 +0000 (04:08 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 12 Oct 2020 20:17:22 +0000 (22:17 +0200)
It can't, because the tables used don't have any loose ends. This also
fixes a bug in the only caller of decode_dc_le(): It didn't check the
return value.

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

index b834b79f28098fe9f53587ae79bebe05d92e2bea..64758164de2770712802b0af428aa83e2d80471d 100644 (file)
@@ -168,10 +168,6 @@ static inline int decode_dc_le(GetBitContext *gb, int component)
     } else {
         code = get_vlc2(gb, ff_dc_chroma_vlc_le.table, DC_VLC_BITS, 2);
     }
-    if (code < 0) {
-        av_log(NULL, AV_LOG_ERROR, "invalid dc code at\n");
-        return 0xffff;
-    }
     if (!code) {
         diff = 0;
     } else {