projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad9d62e
)
Fix + - bug with non flags.
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 23 May 2008 00:29:21 +0000
(
00:29
+0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 23 May 2008 00:29:21 +0000
(
00:29
+0000)
Originally committed as revision 13243 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/opt.c
patch
|
blob
|
history
diff --git
a/libavcodec/opt.c
b/libavcodec/opt.c
index
94ac622
..
70f2f3d
100644
(file)
--- 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;