Mercurial > libavcodec.hg
changeset 6845:80ebdc755fa9 libavcodec
Fix + - bug with non flags.
author | michael |
---|---|
date | Fri, 23 May 2008 00:29:21 +0000 |
parents | 94dc0de175d9 |
children | 4346441afca6 |
files | opt.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/opt.c Thu May 22 19:42:02 2008 +0000 +++ b/opt.c Fri May 23 00:29:21 2008 +0000 @@ -179,8 +179,10 @@ if(o->type == FF_OPT_TYPE_FLAGS){ if (cmd=='+') d= av_get_int(obj, name, NULL) | (int64_t)d; else if(cmd=='-') d= av_get_int(obj, name, NULL) &~(int64_t)d; - }else if(cmd=='-') - d= -d; + }else{ + if (cmd=='+') d= av_get_double(obj, name, NULL) + d; + else if(cmd=='-') d= av_get_double(obj, name, NULL) - d; + } if (!av_set_number(obj, name, d, 1, 1)) return NULL;