diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-03-05 03:59:07 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-03-05 03:59:07 +0000 |
commit | 378774e9a84e46c0831b0a34b6c2e83dfa8bc479 (patch) | |
tree | 2661b24401fe00659d3349fdb7c500e71f05fc84 /libavcodec/opt.c | |
parent | 8b2fce0d3f5a56c40c28899c9237210ca8f9cf75 (diff) | |
download | ffmpeg-378774e9a84e46c0831b0a34b6c2e83dfa8bc479.tar.gz |
Fix handling flags with the MSB set.
Originally committed as revision 12324 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opt.c')
-rw-r--r-- | libavcodec/opt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/opt.c b/libavcodec/opt.c index 42e8eff9fa..928580857a 100644 --- a/libavcodec/opt.c +++ b/libavcodec/opt.c @@ -62,8 +62,8 @@ static const AVOption *av_set_number(void *obj, const char *name, double num, in switch(o->type){ case FF_OPT_TYPE_FLAGS: - case FF_OPT_TYPE_INT: *(int *)dst= lrintf(num/den)*intnum; break; - case FF_OPT_TYPE_INT64: *(int64_t *)dst= lrintf(num/den)*intnum; break; + case FF_OPT_TYPE_INT: *(int *)dst= llrint(num/den)*intnum; break; + case FF_OPT_TYPE_INT64: *(int64_t *)dst= llrint(num/den)*intnum; break; case FF_OPT_TYPE_FLOAT: *(float *)dst= num*intnum/den; break; case FF_OPT_TYPE_DOUBLE:*(double *)dst= num*intnum/den; break; case FF_OPT_TYPE_RATIONAL: @@ -254,7 +254,7 @@ static int av_get_number(void *obj, const char *name, const AVOption **o_out, do if(o_out) *o_out= o; switch(o->type){ - case FF_OPT_TYPE_FLAGS: + case FF_OPT_TYPE_FLAGS: *intnum= *(unsigned int*)dst;return 0; case FF_OPT_TYPE_INT: *intnum= *(int *)dst;return 0; case FF_OPT_TYPE_INT64: *intnum= *(int64_t*)dst;return 0; case FF_OPT_TYPE_FLOAT: *num= *(float *)dst;return 0; |