Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c12
-rw-r--r--source/blender/imbuf/intern/anim_movie.c8
-rw-r--r--source/blender/imbuf/intern/util.c9
-rw-r--r--source/gameengine/VideoTexture/VideoFFmpeg.h2
4 files changed, 29 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 27ae8ec2aba..48930ae2eb8 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -61,14 +61,18 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-#if (LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 105)
+#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 105))
#define FFMPEG_HAVE_AVIO 1
#endif
-#if (LIBAVFORMAT_VERSION_MAJOR >= 53) && (LIBAVFORMAT_VERSION_MINOR >= 3)
+#if (LIBAVFORMAT_VERSION_MAJOR > 53) || ((LIBAVFORMAT_VERSION_MAJOR >= 53) && (LIBAVFORMAT_VERSION_MINOR >= 1))
#define FFMPEG_HAVE_DEFAULT_VAL_UNION 1
#endif
+#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101))
+#define FFMPEG_HAVE_AV_DUMP_FORMAT 1
+#endif
+
#ifndef FFMPEG_HAVE_AVIO
#define AVIO_FLAG_WRITE URL_WRONLY
#define avio_open url_fopen
@@ -82,6 +86,10 @@
#define AVIO_FLAG_WRITE URL_WRONLY
#endif
+#ifndef FFMPEG_HAVE_AV_DUMP_FORMAT
+#define av_dump_format dump_format
+#endif
+
extern void do_init_ffmpeg(void);
static int ffmpeg_type = 0;
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index ba7d2541cae..a0051d85c5b 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -108,6 +108,14 @@
#define FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT
#endif
+#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101))
+#define FFMPEG_HAVE_AV_DUMP_FORMAT 1
+#endif
+
+#ifndef FFMPEG_HAVE_AV_DUMP_FORMAT
+#define av_dump_format dump_format
+#endif
+
#endif //WITH_FFMPEG
#ifdef WITH_REDCODE
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 879ed37cc50..3eed69f4c52 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -62,6 +62,15 @@
#include <libavformat/avformat.h>
#include <libavdevice/avdevice.h>
#include <libavutil/log.h>
+
+#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101))
+#define FFMPEG_HAVE_AV_DUMP_FORMAT 1
+#endif
+
+#ifndef FFMPEG_HAVE_AV_DUMP_FORMAT
+#define av_dump_format dump_format
+#endif
+
#endif
#define UTIL_DEBUG 0
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.h b/source/gameengine/VideoTexture/VideoFFmpeg.h
index f95c1198eaa..70c7a840cb8 100644
--- a/source/gameengine/VideoTexture/VideoFFmpeg.h
+++ b/source/gameengine/VideoTexture/VideoFFmpeg.h
@@ -34,7 +34,9 @@ extern "C" {
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/rational.h>
+#if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101))
#include <libavutil/parseutils.h>
+#endif
#include <libswscale/swscale.h>
#include "DNA_listBase.h"
#include "BLI_threads.h"