diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-07-08 23:50:03 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-07-08 23:50:03 +0000 |
commit | 8dbee6538d44570aa7c2415250b9abe00612624d (patch) | |
tree | 7f0fedf29aeeefe6480df088aa54f89548d13648 /libavcodec/opt.h | |
parent | cdb5af79e386c73cd8194e1f7e61f4b5cc743419 (diff) | |
download | ffmpeg-8dbee6538d44570aa7c2415250b9abe00612624d.tar.gz |
Fix the av_set_string() free / alloc issue.
Originally committed as revision 14134 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opt.h')
-rw-r--r-- | libavcodec/opt.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/opt.h b/libavcodec/opt.h index cbcdedc3c4..26039f49b3 100644 --- a/libavcodec/opt.h +++ b/libavcodec/opt.h @@ -98,7 +98,17 @@ typedef struct AVOption { * has been found */ const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags); -const AVOption *av_set_string(void *obj, const char *name, const char *val); + +attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val); + +/** + * Sets the field of obj with the given name to value. + * @param alloc when 1 then the old value will be av_freed() and the + * new av_strduped() + * when 0 then no av_free() nor av_strdup() will be used + */ +const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc); + const AVOption *av_set_double(void *obj, const char *name, double n); const AVOption *av_set_q(void *obj, const char *name, AVRational n); const AVOption *av_set_int(void *obj, const char *name, int64_t n); |