[125493] trunk/dports/multimedia/gpac

devans at macports.org devans at macports.org
Thu Sep 18 13:51:53 PDT 2014


Revision: 125493
          https://trac.macports.org/changeset/125493
Author:   devans at macports.org
Date:     2014-09-18 13:51:52 -0700 (Thu, 18 Sep 2014)
Log Message:
-----------
gpac: patch for ffmpeg 2.4 compatibility, increment revision to rebuild.

Modified Paths:
--------------
    trunk/dports/multimedia/gpac/Portfile
    trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.0.diff

Added Paths:
-----------
    trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.4.diff

Modified: trunk/dports/multimedia/gpac/Portfile
===================================================================
--- trunk/dports/multimedia/gpac/Portfile	2014-09-18 20:50:50 UTC (rev 125492)
+++ trunk/dports/multimedia/gpac/Portfile	2014-09-18 20:51:52 UTC (rev 125493)
@@ -5,7 +5,7 @@
 
 name                gpac
 version             0.5.0
-revision            4
+revision            5
 categories          multimedia
 platforms           darwin
 maintainers         nomaintainer
@@ -54,7 +54,8 @@
 }
 
 patchfiles          patch-configure.diff \
-                    patch-ffmpeg-2.0.diff
+                    patch-ffmpeg-2.0.diff \
+                    patch-ffmpeg-2.4.diff
 
 # This project's build system misuses the prefix "cpp" to refer to the C++ compiler instead of the C preprocessor.
 # https://sourceforge.net/p/gpac/bugs/287/

Modified: trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.0.diff
===================================================================
--- trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.0.diff	2014-09-18 20:50:50 UTC (rev 125492)
+++ trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.0.diff	2014-09-18 20:51:52 UTC (rev 125493)
@@ -97,7 +97,7 @@
  #define AVERROR_NOFMT AVERROR(EINVAL)
  #endif /* AVERROR_NOFMT */
  
-+#if (LIBAVFORMAT_VERSION_MAJOR >= 54) && (LIBAVFORMAT_VERSION_MINOR >= 20)
++#if (LIBAVFORMAT_VERSION_MAJOR > 54) || ((LIBAVFORMAT_VERSION_MAJOR == 54) && (LIBAVFORMAT_VERSION_MINOR >= 20))
 +#define av_find_stream_info(__c)        avformat_find_stream_info(__c, NULL)
 +#define FF_API_FORMAT_PARAMETERS        1
 +#endif

Added: trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.4.diff
===================================================================
--- trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.4.diff	                        (rev 0)
+++ trunk/dports/multimedia/gpac/files/patch-ffmpeg-2.4.diff	2014-09-18 20:51:52 UTC (rev 125493)
@@ -0,0 +1,63 @@
+--- modules/ffmpeg_in/ffmpeg_demux.c.orig	2014-09-17 11:11:54.000000000 -0700
++++ modules/ffmpeg_in/ffmpeg_demux.c	2014-09-17 11:14:34.000000000 -0700
+@@ -54,7 +54,9 @@
+ 
+ #if (LIBAVFORMAT_VERSION_MAJOR > 54) || ((LIBAVFORMAT_VERSION_MAJOR == 54) && (LIBAVFORMAT_VERSION_MINOR >= 20))
+ #define av_find_stream_info(__c)        avformat_find_stream_info(__c, NULL)
+-#define FF_API_FORMAT_PARAMETERS        1
++#ifndef FF_API_FORMAT_PARAMETERS
++#define FF_API_FORMAT_PARAMETERS        (LIBAVFORMAT_VERSION_MAJOR < 56)
++#endif
+ #endif
+ 
+ 
+@@ -346,7 +348,7 @@
+ 	}
+ 
+ exit:
+-    if (ctx) av_close_input_file(ctx);
++    if (ctx) avformat_close_input(&ctx);
+ 	return ret;
+ }
+ 
+@@ -705,7 +707,7 @@
+ 
+ 		ffd->seekable = (av_seek_frame(ffd->ctx, -1, 0, AVSEEK_FLAG_BACKWARD)<0) ? 0 : 1;
+ 		if (!ffd->seekable) {
+-			av_close_input_file(ffd->ctx);
++			avformat_close_input(&(ffd->ctx));
+ 			open_file(&ffd->ctx, szName, av_in);
+ 			av_find_stream_info(ffd->ctx);
+ 		}
+@@ -719,7 +721,7 @@
+ 
+ err_exit:
+ 	GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMPEG] Error opening file %s: %s\n", url, gf_error_to_string(e)));
+-    if (ffd->ctx) av_close_input_file(ffd->ctx);
++    if (ffd->ctx) avformat_close_input(&(ffd->ctx));
+ 	ffd->ctx = NULL;
+ 	gf_term_on_connect(serv, NULL, e);
+ 	return GF_OK;
+@@ -773,7 +775,7 @@
+ 
+ 	ffd->is_running = 0;
+ 
+-	if (ffd->ctx) av_close_input_file(ffd->ctx);
++	if (ffd->ctx) avformat_close_input(&(ffd->ctx));
+ 	ffd->ctx = NULL;
+ 	ffd->audio_ch = ffd->video_ch = NULL;
+ 	ffd->audio_run = ffd->video_run = 0;
+--- modules/ffmpeg_in/ffmpeg_demux.c.orig	2014-09-17 11:20:35.000000000 -0700
++++ modules/ffmpeg_in/ffmpeg_demux.c	2014-09-17 11:21:52.000000000 -0700
+@@ -624,11 +624,7 @@
+ 			}
+ 			/*setup downloader*/
+ 			av_in->flags |= AVFMT_NOFILE;
+-#if FF_API_FORMAT_PARAMETERS /*commit ffmpeg 603b8bc2a109978c8499b06d2556f1433306eca7*/
+ 			res = avformat_open_input(&ffd->ctx, szName, av_in, NULL);
+-#else
+-			res = av_open_input_stream(&ffd->ctx, &ffd->io, szName, av_in, NULL);
+-#endif
+ 		}
+ 	} else {
+ 		res = open_file(&ffd->ctx, szName, av_in);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140918/9fd249c0/attachment.html>


More information about the macports-changes mailing list