changeset 8262:f0bf2db65dc3 libavcodec

Fix FF_OPT_TYPE_INT64 support of defaults.
author michael
date Fri, 05 Dec 2008 14:55:43 +0000
parents 5f48c58bfd51
children 2e8368ea591a
files opt.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/opt.c	Fri Dec 05 07:58:31 2008 +0000
+++ b/opt.c	Fri Dec 05 14:55:43 2008 +0000
@@ -415,6 +415,11 @@
                 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;