[SCM] libav/experimental: add FF_API_SET_STRING_OLD define to disable the deprecated av_set_string API
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:16:41 UTC 2013
The following commit has been merged in the experimental branch:
commit 838dc131f1d6f1892878de372c7e2ea75fc205d3
Author: Aurelien Jacobs <aurel at gnuage.org>
Date: Thu Sep 30 20:34:35 2010 +0000
add FF_API_SET_STRING_OLD define to disable the deprecated av_set_string API
Originally committed as revision 25276 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f4b2569..781cd29 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -69,6 +69,9 @@
#ifndef FF_API_USE_LPC
#define FF_API_USE_LPC (LIBAVCODEC_VERSION_MAJOR < 53)
#endif
+#ifndef FF_API_SET_STRING_OLD
+#define FF_API_SET_STRING_OLD (LIBAVCODEC_VERSION_MAJOR < 53)
+#endif
#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
#define AV_TIME_BASE 1000000
diff --git a/libavcodec/opt.c b/libavcodec/opt.c
index fed9ae9..ffa422e 100644
--- a/libavcodec/opt.c
+++ b/libavcodec/opt.c
@@ -65,7 +65,7 @@ FF_SYMVER(void, av_opt_set_defaults2, (void *s, int mask, int flags), "LIBAVCODE
}
#endif
-#if LIBAVCODEC_VERSION_MAJOR < 53
+#if FF_API_SET_STRING_OLD
const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc){
const AVOption *o;
if (av_set_string3(obj, name, val, alloc, &o) < 0)
diff --git a/libavcodec/opt.h b/libavcodec/opt.h
index b6e6f59..9514759 100644
--- a/libavcodec/opt.h
+++ b/libavcodec/opt.h
@@ -31,7 +31,7 @@
#include "avcodec.h"
#include "libavutil/opt.h"
-#if LIBAVCODEC_VERSION_MAJOR < 53
+#if FF_API_SET_STRING_OLD
/**
* @see av_set_string2()
*/
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list