Commit ca25cfb9 authored by michael's avatar michael

make the AVOption code work with strings instead of crash


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11140 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1a86a619
......@@ -159,7 +159,7 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){
return NULL;
}
memcpy(((uint8_t*)obj) + o->offset, val, sizeof(val));
memcpy(((uint8_t*)obj) + o->offset, &val, sizeof(val));
return o;
}
......@@ -192,7 +192,7 @@ const char *av_get_string(void *obj, const char *name, const AVOption **o_out, c
if(o_out) *o_out= o;
if(o->type == FF_OPT_TYPE_STRING)
return dst;
return *(void**)dst;
switch(o->type){
case FF_OPT_TYPE_FLAGS: snprintf(buf, buf_len, "0x%08X",*(int *)dst);break;
......
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