]> git.sesse.net Git - ffmpeg/commitdiff
add FF_API_SET_STRING_OLD define to disable the deprecated av_set_string API
authorAurelien Jacobs <aurel@gnuage.org>
Thu, 30 Sep 2010 20:34:35 +0000 (20:34 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Thu, 30 Sep 2010 20:34:35 +0000 (20:34 +0000)
Originally committed as revision 25276 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/avcodec.h
libavcodec/opt.c
libavcodec/opt.h

index f4b2569d1182eff937278a22746e69c4d6ca1c3a..781cd298bf5ceed3a0f937a3c288ff699329aee4 100644 (file)
@@ -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
index fed9ae9930128ec8854c9a0987f347f3097e6875..ffa422ec93ddf1f4802f9d41744c20892d56f77c 100644 (file)
@@ -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)
index b6e6f59ea436e6dfe7d74f06a3179268ebbd6d3e..95147595b7fb8f5d3909d5b580fd92b5b1d61e17 100644 (file)
@@ -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()
  */