comparison opt.h @ 7224:d5a52b28c9de libavcodec

Fix the av_set_string() free / alloc issue.
author michael
date Tue, 08 Jul 2008 23:50:03 +0000
parents 68528efbc91f
children a725aab8fe81
comparison
equal deleted inserted replaced
7223:0133a6c7480f 7224:d5a52b28c9de
96 * @param[in] unit the unit of the option to look for, or any if NULL 96 * @param[in] unit the unit of the option to look for, or any if NULL
97 * @return a pointer to the option found, or NULL if no option 97 * @return a pointer to the option found, or NULL if no option
98 * has been found 98 * has been found
99 */ 99 */
100 const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags); 100 const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
101 const AVOption *av_set_string(void *obj, const char *name, const char *val); 101
102 attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val);
103
104 /**
105 * Sets the field of obj with the given name to value.
106 * @param alloc when 1 then the old value will be av_freed() and the
107 * new av_strduped()
108 * when 0 then no av_free() nor av_strdup() will be used
109 */
110 const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc);
111
102 const AVOption *av_set_double(void *obj, const char *name, double n); 112 const AVOption *av_set_double(void *obj, const char *name, double n);
103 const AVOption *av_set_q(void *obj, const char *name, AVRational n); 113 const AVOption *av_set_q(void *obj, const char *name, AVRational n);
104 const AVOption *av_set_int(void *obj, const char *name, int64_t n); 114 const AVOption *av_set_int(void *obj, const char *name, int64_t n);
105 double av_get_double(void *obj, const char *name, const AVOption **o_out); 115 double av_get_double(void *obj, const char *name, const AVOption **o_out);
106 AVRational av_get_q(void *obj, const char *name, const AVOption **o_out); 116 AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);