aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/opt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-05 14:55:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-05 14:55:43 +0000
commit36d5b17514e63c90edd92281539088b1879764e0 (patch)
treea8fa6ba00aeb3e2713f226b61a550352c684bfad /libavcodec/opt.c
parent3d5e1bfb20d3489d7bb2fa26196e02086e06f2b8 (diff)
downloadffmpeg-36d5b17514e63c90edd92281539088b1879764e0.tar.gz
Fix FF_OPT_TYPE_INT64 support of defaults.
Originally committed as revision 16008 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opt.c')
-rw-r--r--libavcodec/opt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/opt.c b/libavcodec/opt.c
index acf94ba824..bc2f3bdd74 100644
--- a/libavcodec/opt.c
+++ b/libavcodec/opt.c
@@ -415,6 +415,11 @@ void av_opt_set_defaults2(void *s, int mask, int flags)
av_set_int(s, opt->name, val);
}
break;
+ case FF_OPT_TYPE_INT64:
+ if((double)(opt->default_val+0.6) == opt->default_val)
+ av_log(s, AV_LOG_DEBUG, "loss of precission in default of %s\n", opt->name);
+ av_set_int(s, opt->name, opt->default_val);
+ break;
case FF_OPT_TYPE_FLOAT: {
double val;
val = opt->default_val;