[GRASS-SVN] r56626 - grass/branches/develbranch_6/lib/ogsf

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 7 01:46:31 PDT 2013


Author: hamish
Date: 2013-06-07 01:46:31 -0700 (Fri, 07 Jun 2013)
New Revision: 56626

Modified:
   grass/branches/develbranch_6/lib/ogsf/gsd_img_mpeg.c
Log:
tweaks to get it working on Debian/squeeze and Ubuntu/12.04 (#1423)

Modified: grass/branches/develbranch_6/lib/ogsf/gsd_img_mpeg.c
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/gsd_img_mpeg.c	2013-06-06 09:23:10 UTC (rev 56625)
+++ grass/branches/develbranch_6/lib/ogsf/gsd_img_mpeg.c	2013-06-07 08:46:31 UTC (rev 56626)
@@ -27,6 +27,12 @@
 #ifdef HAVE_FFMPEG
 #include <avformat.h>
 #include <avio.h>
+#if LIBAVUTIL_VERSION_MAJOR < 51
+#include <avutil.h>
+#else
+/* libavutil 51.22.1's avutil.h doesn't include libavutil/mathematics.h */
+#include <mathematics.h>
+#endif
 
 /* 5 seconds stream duration */
 #define STREAM_DURATION   5.0
@@ -58,7 +64,7 @@
     AVCodecContext *c;
     AVStream *st;
 
-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 100, 0)
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 0, 0)
     st = av_new_stream(oc, 0);
 #else
     st = avformat_new_stream(oc, NULL);
@@ -369,7 +375,7 @@
 
     /* open the output file, if needed */
     if (!(fmt->flags & AVFMT_NOFILE)) {
-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 100, 0)
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 0, 0)
         if (url_fopen(&oc->pb, filename, URL_WRONLY) < 0) { 
 #else
 	if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) {



More information about the grass-commit mailing list