diff mbox series

[FFmpeg-devel,2/7] avcodec/speedhq: Don't pretend reading DC can fail

Message ID 20201012081217.1643833-2-andreas.rheinhardt@gmail.com
State Accepted
Commit 7b6acfa68f034c6e2cf2455dbc0f96d959ef36b0
Headers show
Series [FFmpeg-devel,1/7] avcodec/indeo2: Remove #ifdef BITSTREAM_READER_LE cruft | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 12, 2020, 8:12 a.m. UTC
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 | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
index b834b79f28..64758164de 100644
--- a/libavcodec/speedhq.c
+++ b/libavcodec/speedhq.c
@@ -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 {