Mercurial > libavcodec.hg
changeset 5976:58ee364cd8fb libavcodec
make the AVOption code work with strings instead of crash
author | michael |
---|---|
date | Mon, 03 Dec 2007 01:03:54 +0000 |
parents | 04f8a627587b |
children | 853d1ea80942 |
files | opt.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/opt.c Sun Dec 02 22:04:21 2007 +0000 +++ b/opt.c Mon Dec 03 01:03:54 2007 +0000 @@ -159,7 +159,7 @@ 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 @@ 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;