shithub: libvpx

Download patch

ref: 6b993f076ea3f4b270b97d8b3bf3210372e477e0
parent: be6aeadaf49de28f13355d5dd7f64b4074dcca7c
author: James Zern <jzern@google.com>
date: Thu Feb 5 16:06:29 EST 2015

vpxdec: correct file op error messages

- use fatal() consistently
- correct wording in output file open failure message

Change-Id: I4dafe03c6eece6df53375f72adf0d5964e211c9a

--- a/vpxdec.c
+++ b/vpxdec.c
@@ -519,7 +519,7 @@
   } else {
     FILE *file = fopen(name, "wb");
     if (!file)
-      fatal("Failed to output file %s", name);
+      fatal("Failed to open output file '%s'", name);
     return file;
   }
 }
@@ -725,8 +725,7 @@
   infile = strcmp(fn, "-") ? fopen(fn, "rb") : set_binary_mode(stdin);
 
   if (!infile) {
-    fprintf(stderr, "Failed to open file '%s'", strcmp(fn, "-") ? fn : "stdin");
-    return EXIT_FAILURE;
+    fatal("Failed to open input file '%s'", strcmp(fn, "-") ? fn : "stdin");
   }
 #if CONFIG_OS_SUPPORT
   /* Make sure we don't dump to the terminal, unless forced to with -o - */