Commit ba3758d9 authored by stefano's avatar stefano

Remove calls to deprecated av_set_string2() with calls to

av_set_string3().


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16241 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 611415bd
...@@ -224,7 +224,7 @@ void set_context_opts(void *ctx, void *opts_ctx, int flags) ...@@ -224,7 +224,7 @@ void set_context_opts(void *ctx, void *opts_ctx, int flags)
const char *str= av_get_string(opts_ctx, opt_names[i], &opt, buf, sizeof(buf)); const char *str= av_get_string(opts_ctx, opt_names[i], &opt, buf, sizeof(buf));
/* if an option with name opt_names[i] is present in opts_ctx then str is non-NULL */ /* if an option with name opt_names[i] is present in opts_ctx then str is non-NULL */
if(str && ((opt->flags & flags) == flags)) if(str && ((opt->flags & flags) == flags))
av_set_string2(ctx, opt_names[i], str, 1); av_set_string3(ctx, opt_names[i], str, 1, NULL);
} }
} }
......
...@@ -3735,13 +3735,11 @@ static void load_module(const char *filename) ...@@ -3735,13 +3735,11 @@ static void load_module(const char *filename)
static int ffserver_opt_default(const char *opt, const char *arg, static int ffserver_opt_default(const char *opt, const char *arg,
AVCodecContext *avctx, int type) AVCodecContext *avctx, int type)
{ {
const AVOption *o = NULL; int ret = 0;
const AVOption *o2 = av_find_opt(avctx, opt, NULL, type, type); const AVOption *o2 = av_find_opt(avctx, opt, NULL, type, type);
if(o2) if(o2)
o = av_set_string2(avctx, opt, arg, 1); ret = av_set_string3(avctx, opt, arg, 1, NULL);
if(!o) return ret;
return -1;
return 0;
} }
static int parse_ffconfig(const char *filename) static int parse_ffconfig(const char *filename)
......
...@@ -207,7 +207,10 @@ const AVOption *av_set_string2(void *obj, const char *name, const char *val, int ...@@ -207,7 +207,10 @@ const AVOption *av_set_string2(void *obj, const char *name, const char *val, int
} }
const AVOption *av_set_string(void *obj, const char *name, const char *val){ const AVOption *av_set_string(void *obj, const char *name, const char *val){
return av_set_string2(obj, name, val, 0); const AVOption *o;
if (av_set_string3(obj, name, val, 0, &o) < 0)
return NULL;
return o;
} }
const AVOption *av_set_double(void *obj, const char *name, double n){ const AVOption *av_set_double(void *obj, const char *name, double n){
......
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