[Ekiga-devel-list] first patch libopal



hi
for some reason
MPEG4-ffmpeg is not recognised by configure and it does not build with
the latest ffmpeg,
i have not tested this, but this is what i had to do to get it to compile.
mike

mdupont mdupontdesktop2:~/2009/03/ekiga/opal/plugins/video/MPEG4-ffmpeg$
svn diff
Index: mpeg4.cxx
===================================================================
--- mpeg4.cxx	(revision 22314)
+++ mpeg4.cxx	(working copy)
@@ -99,6 +99,7 @@
 // Private headers from the ffmpeg source tree.
 #include <libavutil/intreadwrite.h>
 #include <libavutil/bswap.h>
+#include <libavutil/internal.h>
 #include <libavcodec/mpegvideo.h>

 #else /* LIBAVCODEC_HAVE_SOURCE_DIR */
@@ -902,7 +903,7 @@
 static char * num2str(int num)
 {
   char buf[20];
-  sprintf(buf, "%i", num);
+  snprintf(buf,sizeof(buf), "%i", num);
   return strdup(buf);
 }

@@ -927,8 +928,8 @@

   char ** strings = (char **) parm;
   for (char ** string = strings; *string != NULL; string++)
-    free(*string);
-  free(strings);
+    av_free(*string);
+  av_free(strings);
   return 1;
 }

@@ -1783,16 +1784,16 @@

   switch (dstLevel) {
     case -10:
-      sprintf(buffer, "%u", (0));
+      snprintf(buffer,sizeof(buffer), "%u", (0));
       break;
     case -2:
-      sprintf(buffer, "%u", (8));
+      snprintf(buffer,sizeof(buffer), "%u", (8));
       break;
     case -1:
-      sprintf(buffer, "%u", (9));
+      snprintf(buffer,sizeof(buffer), "%u", (9));
       break;
     default:
-      sprintf(buffer, "%u", (dstProfile<<4)|(dstLevel));
+      snprintf(buffer,sizeof(buffer), "%u", (dstProfile<<4)|(dstLevel));
       break;
   }

@@ -1803,7 +1804,7 @@

 static void FreeString(char * str)
 {
-  free(str);
+  av_free(str);
 }

 static struct PluginCodec_Option const H245ProfileLevelMPEG4 =


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]