]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/webp.c
avcodec/h264: Declare the local variable decode_chroma as const.
[ffmpeg] / libavcodec / webp.c
index 8281cc45b49442d03cb966371d6a67c686738063..a0d4d1812d94ab3f86e9507a120aff3218079f89 100644 (file)
@@ -694,7 +694,7 @@ static int decode_entropy_coded_image(WebPContext *s, enum ImageRole role,
                 length = offset + get_bits(&s->gb, extra_bits) + 1;
             }
             prefix_code = huff_reader_get_symbol(&hg[HUFF_IDX_DIST], &s->gb);
-            if (prefix_code > 39) {
+            if (prefix_code > 39U) {
                 av_log(s->avctx, AV_LOG_ERROR,
                        "distance prefix code too large: %d\n", prefix_code);
                 return AVERROR_INVALIDDATA;
@@ -1351,6 +1351,9 @@ static int vp8_lossy_decode_frame(AVCodecContext *avctx, AVFrame *p,
     if (ret < 0)
         return ret;
 
+    if (!*got_frame)
+        return AVERROR_INVALIDDATA;
+
     update_canvas_size(avctx, avctx->width, avctx->height);
 
     if (s->has_alpha) {