Mercurial > libavcodec.hg
changeset 6451:355b2eb9f553 libavcodec
Fix handling flags with the MSB set.
author | michael |
---|---|
date | Wed, 05 Mar 2008 03:59:07 +0000 |
parents | c32be43b52b2 |
children | 2a2f9cb7f1b0 |
files | opt.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/opt.c Wed Mar 05 00:43:11 2008 +0000 +++ b/opt.c Wed Mar 05 03:59:07 2008 +0000 @@ -62,8 +62,8 @@ 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 @@ 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;