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
path: root/source
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2011-05-27 03:19:15 +0400
committerPeter Schlaile <peter@schlaile.de>2011-05-27 03:19:15 +0400
commitf1d3982bf670890b686a200f95ec8008f6d28f23 (patch)
tree331a11f605f65118068ac9cb33522471f50457fb /source
parente070975ae44d85d0f6e13b261815f6c395692521 (diff)
== FFMPEG ==
Added some API compatibility code again, since some API-changes weren't even documented (they even didn't do a proper version-bump, arghh!) If it breaks again, please tell!
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index dbb4bd48629..662763525e0 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -61,6 +61,21 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
+#if (LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 105)
+#define FFMPEG_HAVE_AVIO 1
+#endif
+
+#if (LIBAVFORMAT_VERSION_MAJOR >= 53) && (LIBAVFORMAT_VERSION_MINOR >= 3)
+#define FFMPEG_HAVE_DEFAULT_VAL_UNION 1
+#endif
+
+#ifndef FFMPEG_HAVE_AVIO
+#define AVIO_FLAG_WRITE URL_WRONLY
+#define avio_open url_fopen
+#define avio_tell url_ftell
+#define avio_close url_fclose
+#endif
+
extern void do_init_ffmpeg(void);
static int ffmpeg_type = 0;
@@ -1051,12 +1066,20 @@ IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int
switch (o->type) {
case FF_OPT_TYPE_INT:
case FF_OPT_TYPE_INT64:
+#ifdef FFMPEG_HAVE_DEFAULT_VAL_UNION
val.i = o->default_val.i64;
+#else
+ val.i = o->default_val;
+#endif
idp_type = IDP_INT;
break;
case FF_OPT_TYPE_DOUBLE:
case FF_OPT_TYPE_FLOAT:
+#ifdef FFMPEG_HAVE_DEFAULT_VAL_UNION
val.f = o->default_val.dbl;
+#else
+ val.f = o->default_val;
+#endif
idp_type = IDP_FLOAT;
break;
case FF_OPT_TYPE_STRING: