[FFmpeg-cvslog] r11140 - trunk/libavcodec/opt.c
michael
subversion
Mon Dec 3 02:03:54 CET 2007
Author: michael
Date: Mon Dec 3 02:03:54 2007
New Revision: 11140
Log:
make the AVOption code work with strings instead of crash
Modified:
trunk/libavcodec/opt.c
Modified: trunk/libavcodec/opt.c
==============================================================================
--- trunk/libavcodec/opt.c (original)
+++ trunk/libavcodec/opt.c Mon Dec 3 02:03:54 2007
@@ -159,7 +159,7 @@ const AVOption *av_set_string(void *obj,
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, con
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;
More information about the ffmpeg-cvslog
mailing list