[FFmpeg-cvslog] r12324 - trunk/libavcodec/opt.c
michael
subversion
Wed Mar 5 04:59:07 CET 2008
Author: michael
Date: Wed Mar 5 04:59:07 2008
New Revision: 12324
Log:
Fix handling flags with the MSB set.
Modified:
trunk/libavcodec/opt.c
Modified: trunk/libavcodec/opt.c
==============================================================================
--- trunk/libavcodec/opt.c (original)
+++ trunk/libavcodec/opt.c Wed Mar 5 04:59:07 2008
@@ -62,8 +62,8 @@ static const AVOption *av_set_number(voi
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, cons
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;
More information about the ffmpeg-cvslog
mailing list