2014-09-23 15:55:23 +00:00
|
|
|
--- a/trunk/gpac/modules/ffmpeg_in/ffmpeg_demux.c
|
|
|
|
+++ b/trunk/gpac/modules/ffmpeg_in/ffmpeg_demux.c
|
|
|
|
@@ -54,13 +54,10 @@
|
|
|
|
#endif /* AVERROR_NOFMT */
|
|
|
|
|
|
|
|
|
|
|
|
-#if (LIBAVFORMAT_VERSION_MAJOR >= 54) && (LIBAVFORMAT_VERSION_MINOR >= 20)
|
|
|
|
+#if ((LIBAVFORMAT_VERSION_MAJOR == 54) && (LIBAVFORMAT_VERSION_MINOR >= 20)) || (LIBAVFORMAT_VERSION_MAJOR > 54)
|
2013-10-26 00:28:26 +00:00
|
|
|
|
2014-09-23 15:55:23 +00:00
|
|
|
#define av_find_stream_info(__c) avformat_find_stream_info(__c, NULL)
|
|
|
|
-#ifndef FF_API_FORMAT_PARAMETERS
|
|
|
|
-#define FF_API_FORMAT_PARAMETERS 1
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
+#define USE_AVFORMAT_OPEN_INPUT 1
|
2013-10-26 00:28:26 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2014-09-23 15:55:23 +00:00
|
|
|
@@ -275,7 +272,7 @@
|
|
|
|
}
|
|
|
|
if (!has_audio && !has_video) goto exit;
|
|
|
|
ret = 1;
|
|
|
|
-#if LIBAVFORMAT_VERSION_MAJOR < 53 && LIBAVFORMAT_VERSION_MINOR < 45
|
|
|
|
+#if ((LIBAVFORMAT_VERSION_MAJOR == 52) && (LIBAVFORMAT_VERSION_MINOR <= 47)) || (LIBAVFORMAT_VERSION_MAJOR < 52)
|
|
|
|
fmt_out = guess_stream_format(NULL, url, NULL);
|
2013-10-26 00:28:26 +00:00
|
|
|
#else
|
2014-09-23 15:55:23 +00:00
|
|
|
fmt_out = av_guess_format(NULL, url, NULL);
|
|
|
|
@@ -588,7 +585,7 @@
|
|
|
|
}
|
|
|
|
/*setup downloader*/
|
|
|
|
av_in->flags |= AVFMT_NOFILE;
|
|
|
|
-#if FF_API_FORMAT_PARAMETERS /*commit ffmpeg 603b8bc2a109978c8499b06d2556f1433306eca7*/
|
|
|
|
+#ifdef USE_AVFORMAT_OPEN_INPUT /*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);
|
|
|
|
--- a/trunk/gpac/modules/ffmpeg_in/ffmpeg_in.h
|
|
|
|
+++ b/trunk/gpac/modules/ffmpeg_in/ffmpeg_in.h
|
|
|
|
@@ -99,7 +99,7 @@
|
2013-10-26 00:28:26 +00:00
|
|
|
|
2014-09-23 15:55:23 +00:00
|
|
|
#ifndef FFMPEG_OLD_HEADERS
|
2013-10-26 00:28:26 +00:00
|
|
|
|
2014-09-23 15:55:23 +00:00
|
|
|
-#if (LIBAVCODEC_VERSION_MAJOR <= 52) && (LIBAVCODEC_VERSION_MINOR <= 20)
|
|
|
|
+#if ((LIBAVCODEC_VERSION_MAJOR == 52) && (LIBAVCODEC_VERSION_MINOR <= 20)) || (LIBAVCODEC_VERSION_MAJOR < 52)
|
|
|
|
#undef USE_AVCODEC2
|
|
|
|
#else
|
|
|
|
#define USE_AVCODEC2 1
|