[xiph-commits] r3158 - liboggplay/trunk/plugin

shans at svn.annodex.net shans at svn.annodex.net
Mon Jul 9 23:47:18 PDT 2007


Author: shans
Date: 2007-07-09 23:47:18 -0700 (Mon, 09 Jul 2007)
New Revision: 3158

Modified:
   liboggplay/trunk/plugin/plugin_cmml.c
   liboggplay/trunk/plugin/plugin_oggplay.c
Log:
to retrieve cmml appropriately we should be using filename.anx and Accept: text/x-cmml.



Modified: liboggplay/trunk/plugin/plugin_cmml.c
===================================================================
--- liboggplay/trunk/plugin/plugin_cmml.c	2007-07-04 10:12:33 UTC (rev 3157)
+++ liboggplay/trunk/plugin/plugin_cmml.c	2007-07-10 06:47:18 UTC (rev 3158)
@@ -261,7 +261,7 @@
       "GET %s HTTP/1.0\n"
       "Host: %s\n"
       "User-Agent: AnnodexFirefoxPlugin/0.1\n"
-      "Accept: */*\n"
+      "Accept: text/x-cmml\n"
       "Connection: Keep-Alive\n\n", path, host);
 
   he = gethostbyname(host);
@@ -354,8 +354,8 @@
                                                             int proxyPort) {
 
   CmmlThreadInfo  * info;
-  char            * mdot  = strrchr(movie, '.');
-  char            * fname = malloc(mdot - movie + 6);
+  //char            * mdot  = strrchr(movie, '.');
+  char            * fname;// = malloc(mdot - movie + 6);
 #ifdef WIN32
   HANDLE            thread;
   int               tid;
@@ -363,8 +363,7 @@
   pthread_t         thread;
 #endif
   
-  strcpy(fname, movie);
-  strcpy(fname + (mdot - movie), ".cmml");
+  fname = strdup(movie);
 
   info = malloc(sizeof(CmmlThreadInfo));
   info->file      = fname;

Modified: liboggplay/trunk/plugin/plugin_oggplay.c
===================================================================
--- liboggplay/trunk/plugin/plugin_oggplay.c	2007-07-04 10:12:33 UTC (rev 3157)
+++ liboggplay/trunk/plugin/plugin_oggplay.c	2007-07-10 06:47:18 UTC (rev 3158)
@@ -250,7 +250,6 @@
       }
 
     }
-
     if (r != E_OGGPLAY_CONTINUE && r != E_OGGPLAY_USER_INTERRUPT) {      
       break;
     }



More information about the commits mailing list