[xiph-commits] r15999 - trunk/ffmpeg2theora/src

j at svn.xiph.org j at svn.xiph.org
Thu May 14 10:52:11 PDT 2009


Author: j
Date: 2009-05-14 10:52:09 -0700 (Thu, 14 May 2009)
New Revision: 15999

Modified:
   trunk/ffmpeg2theora/src/avinfo.c
Log:
use strchr(which also exists with mingw32) instead of index

Modified: trunk/ffmpeg2theora/src/avinfo.c
===================================================================
--- trunk/ffmpeg2theora/src/avinfo.c	2009-05-13 02:13:57 UTC (rev 15998)
+++ trunk/ffmpeg2theora/src/avinfo.c	2009-05-14 17:52:09 UTC (rev 15999)
@@ -3,7 +3,7 @@
  * ffmpeg2theora.c -- Convert ffmpeg supported a/v files to Ogg Theora / Ogg Vorbis
  * Copyright (C) 2003-2008 <j at v2v.cc>
  *
- * gcc -o avinfo avinfo.c `pkg-config --cflags --libs libavcodec libavformat`
+ * gcc -o avinfo avinfo.c -DAVINFO `pkg-config --cflags --libs libavcodec libavformat`
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -71,7 +71,7 @@
         case JSON_STRING:
             p = (char *)value;
             fprintf(output, "  \"%s\": \"", key);
-            while(pp = index(p, 34)) {
+            while(pp = strchr(p, 34)) {
                 *pp = '\0';
                 fprintf(output, "%s\\\"", p);
                 p = pp + 1;
@@ -301,8 +301,7 @@
     fprintf(output, "}\n");
 }
 
-// uncomment this block to use avinfo on its own
-/*
+#ifdef AVINFO
 int main(int argc, char **argv) {
     char inputfile_name[255];
     AVInputFormat *input_fmt = NULL;
@@ -331,4 +330,4 @@
         fclose(output);
     }
 }
-*/
+#endif



More information about the commits mailing list