Commit 64e74b68 authored by Stefano Sabatini's avatar Stefano Sabatini

Put under #if LIBAVCODEC_VERSION_MAJOR < 53 the deprecated functions

av_set_string() and av_set_string2(), they will be dropped at the next
major bump.

Originally committed as revision 16243 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 5c548937
...@@ -199,6 +199,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons ...@@ -199,6 +199,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
return 0; return 0;
} }
#if LIBAVCODEC_VERSION_MAJOR < 53
const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc){ const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc){
const AVOption *o; const AVOption *o;
if (av_set_string3(obj, name, val, alloc, &o) < 0) if (av_set_string3(obj, name, val, alloc, &o) < 0)
...@@ -212,6 +213,7 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){ ...@@ -212,6 +213,7 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){
return NULL; return NULL;
return o; return o;
} }
#endif
const AVOption *av_set_double(void *obj, const char *name, double n){ const AVOption *av_set_double(void *obj, const char *name, double n){
return av_set_number(obj, name, n, 1, 1); return av_set_number(obj, name, n, 1, 1);
......
...@@ -99,6 +99,7 @@ typedef struct AVOption { ...@@ -99,6 +99,7 @@ typedef struct AVOption {
*/ */
const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags); const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
#if LIBAVCODEC_VERSION_MAJOR < 53
/** /**
* @see av_set_string2() * @see av_set_string2()
*/ */
...@@ -111,6 +112,7 @@ attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, ...@@ -111,6 +112,7 @@ attribute_deprecated const AVOption *av_set_string(void *obj, const char *name,
* @see av_set_string3() * @see av_set_string3()
*/ */
attribute_deprecated const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc); attribute_deprecated const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc);
#endif
/** /**
* Sets the field of obj with the given name to value. * Sets the field of obj with the given name to value.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment