summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-05-23 00:29:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-05-23 00:29:21 +0000
commit4a13a2d4f797ac42498ab6374e2930b5c12a0c0c (patch)
tree715a1e6849d84533110d962d8d24c567a54a515e /libavcodec
parentad9d62ef22de83b36fc7da009734292a209ab765 (diff)
Fix + - bug with non flags.
Originally committed as revision 13243 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/opt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/opt.c b/libavcodec/opt.c
index 94ac622180..70f2f3d91f 100644
--- a/libavcodec/opt.c
+++ b/libavcodec/opt.c
@@ -179,8 +179,10 @@ const AVOption *av_set_string(void *obj, const char *name, const char *val){
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;