]> granicus.if.org Git - libvpx/commitdiff
Fix the decoder seg fault when frame is corrupted.
authorJerome Jiang <jianj@google.com>
Thu, 20 Apr 2017 21:48:22 +0000 (14:48 -0700)
committerJerome Jiang <jianj@google.com>
Thu, 20 Apr 2017 21:55:42 +0000 (14:55 -0700)
BUG=webm:1399

Change-Id: I1e006e0260d9b56a4d2273659ca19b86c69c474b

vpxdec.c

index fa85ac8587c23815d856aff7387fe705fc82fe81..6db2afb4aeca1e7a2138858aa44c582d7dd7f96b 100644 (file)
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -977,7 +977,7 @@ static int main_loop(int argc, const char **argv_) {
         if (do_md5) {
           update_image_md5(img, planes, &md5_ctx);
         } else {
-          write_image_file(img, planes, outfile);
+          if (!corrupted) write_image_file(img, planes, outfile);
         }
       } else {
         generate_filename(outfile_pattern, outfile_name, PATH_MAX, img->d_w,