]> git.sesse.net Git - ffmpeg/blobdiff - cmdutils.c
vp3: The DC-only IDCT is surprisingly not supposed to be bitexact to the
[ffmpeg] / cmdutils.c
index 7e652a1e7f9fb81e8bc86d8c485fc79ba25d74b0..2349b7052e49b361c29150328db400c6dd890198 100644 (file)
@@ -292,17 +292,11 @@ void set_context_opts(void *ctx, void *opts_ctx, int flags)
 void print_error(const char *filename, int err)
 {
     char errbuf[128];
+    const char *errbuf_ptr = errbuf;
 
-    switch(err) {
-#if CONFIG_NETWORK
-    case AVERROR(FF_NETERROR(EPROTONOSUPPORT)):
-        fprintf(stderr, "%s: Unsupported network protocol\n", filename);
-        break;
-#endif
-    default:
-        av_strerror(err, errbuf, sizeof(errbuf));
-        fprintf(stderr, "%s: %s\n", filename, errbuf);
-    }
+    if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
+        errbuf_ptr = strerror(AVUNERROR(err));
+    fprintf(stderr, "%s: %s\n", filename, errbuf_ptr);
 }
 
 #define PRINT_LIB_VERSION(outstream,libname,LIBNAME,indent)             \
@@ -615,6 +609,11 @@ void show_pix_fmts(void)
         "FLAGS NAME            NB_COMPONENTS BITS_PER_PIXEL\n"
         "-----\n");
 
+#if !CONFIG_SWSCALE
+#   define sws_isSupportedInput(x)  0
+#   define sws_isSupportedOutput(x) 0
+#endif
+
     for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) {
         const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[pix_fmt];
         printf("%c%c%c%c%c %-16s       %d            %2d\n",
@@ -642,7 +641,7 @@ int read_yesno(void)
 
 int read_file(const char *filename, char **bufptr, size_t *size)
 {
-    FILE *f = fopen(filename, "r");
+    FILE *f = fopen(filename, "rb");
 
     if (!f) {
         fprintf(stderr, "Cannot read file '%s': %s\n", filename, strerror(errno));