[FFmpeg-cvslog] r16008 - trunk/libavcodec/opt.c

michael subversion
Fri Dec 5 15:55:43 CET 2008


Author: michael
Date: Fri Dec  5 15:55:43 2008
New Revision: 16008

Log:
Fix FF_OPT_TYPE_INT64 support of defaults.


Modified:
   trunk/libavcodec/opt.c

Modified: trunk/libavcodec/opt.c
==============================================================================
--- trunk/libavcodec/opt.c	(original)
+++ trunk/libavcodec/opt.c	Fri Dec  5 15:55:43 2008
@@ -415,6 +415,11 @@ void av_opt_set_defaults2(void *s, int m
                 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;




More information about the ffmpeg-cvslog mailing list