comparison opt.c @ 8407:8903ad65c412 libavcodec

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.
author stefano
date Fri, 19 Dec 2008 22:37:56 +0000
parents ea27308fa023
children 6a12ba62978a
comparison
equal deleted inserted replaced
8406:ea27308fa023 8407:8903ad65c412
197 197
198 memcpy(((uint8_t*)obj) + o->offset, &val, sizeof(val)); 198 memcpy(((uint8_t*)obj) + o->offset, &val, sizeof(val));
199 return 0; 199 return 0;
200 } 200 }
201 201
202 #if LIBAVCODEC_VERSION_MAJOR < 53
202 const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc){ 203 const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc){
203 const AVOption *o; 204 const AVOption *o;
204 if (av_set_string3(obj, name, val, alloc, &o) < 0) 205 if (av_set_string3(obj, name, val, alloc, &o) < 0)
205 return NULL; 206 return NULL;
206 return o; 207 return o;
210 const AVOption *o; 211 const AVOption *o;
211 if (av_set_string3(obj, name, val, 0, &o) < 0) 212 if (av_set_string3(obj, name, val, 0, &o) < 0)
212 return NULL; 213 return NULL;
213 return o; 214 return o;
214 } 215 }
216 #endif
215 217
216 const AVOption *av_set_double(void *obj, const char *name, double n){ 218 const AVOption *av_set_double(void *obj, const char *name, double n){
217 return av_set_number(obj, name, n, 1, 1); 219 return av_set_number(obj, name, n, 1, 1);
218 } 220 }
219 221