[xiph-commits] r16487 - in trunk/ffmpeg2theora: . src

j at svn.xiph.org j at svn.xiph.org
Wed Aug 19 02:00:51 PDT 2009


Author: j
Date: 2009-08-19 02:00:51 -0700 (Wed, 19 Aug 2009)
New Revision: 16487

Modified:
   trunk/ffmpeg2theora/SConstruct
   trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
output valid json for errors, depend on 1.1.0 to work with current theora trunk

Modified: trunk/ffmpeg2theora/SConstruct
===================================================================
--- trunk/ffmpeg2theora/SConstruct	2009-08-18 22:47:58 UTC (rev 16486)
+++ trunk/ffmpeg2theora/SConstruct	2009-08-19 09:00:51 UTC (rev 16487)
@@ -107,7 +107,7 @@
    print 'pkg-config >= %s not found.' % pkgconfig_version 
    Exit(1)
 
-XIPH_LIBS="ogg >= 1.1 vorbis vorbisenc theoradec >= 1.1beta1 theoraenc >= 1.1beta1"
+XIPH_LIBS="ogg >= 1.1 vorbis vorbisenc theoradec >= 1.1.0 theoraenc >= 1.1.0"
 
 if not conf.CheckPKG(XIPH_LIBS): 
   print 'some xiph libs are missing, ffmpeg2theora depends on %s' % XIPH_LIBS

Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c	2009-08-18 22:47:58 UTC (rev 16486)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c	2009-08-19 09:00:51 UTC (rev 16487)
@@ -2537,7 +2537,7 @@
                     (double) convert->context->start_time / AV_TIME_BASE;
                 if (info.twopass!=1 && !info.outfile) {
                     if (info.frontend)
-                        fprintf(info.frontend, "\"{result\": \"Unable to open output file.\"}\n");
+                        fprintf(info.frontend, "{\"code\": \"badfile\", \"error\":\"Unable to open output file.\"}\n");
                     else
                         fprintf(stderr,"\nUnable to open output file `%s'.\n", outputfile_name);
                     return(1);
@@ -2552,9 +2552,9 @@
         }
         else{
                 if (info.frontend)
-                    fprintf(info.frontend, "{\"code\": \"badfile\", \"input format not supported.\"}\n");
+                    fprintf(info.frontend, "{\"code\": \"badfile\", \"error\":\"input format not supported.\"}\n");
                 else if (output_json)
-                    fprintf(stdout, "{\"code\": \"badfile\", \"input format not supported.\"}\n");
+                    fprintf(stdout, "{\"code\": \"badfile\", \"error\":\"input format not supported.\"}\n");
                 else
                     fprintf(stderr,"\nUnable to decode input.\n");
                 return(1);
@@ -2563,9 +2563,9 @@
     }
     else{
             if (info.frontend)
-                fprintf(info.frontend, "{\"code\": \"badfile\", \"file does not exist or has unknown data format.\"}\n");
+                fprintf(info.frontend, "{\"code\": \"badfile\", \"error\":\"file does not exist or has unknown data format.\"}\n");
             else if (output_json)
-                fprintf(stdout, "{\"code\": \"badfile\", \"file does not exist or has unknown data format.\"}\n");
+                fprintf(stdout, "{\"code\": \"badfile\", \"error\":\"file does not exist or has unknown data format.\"}\n");
             else
                 fprintf(stderr, "\nFile `%s' does not exist or has an unknown data format.\n", inputfile_name);
             return(1);



More information about the commits mailing list