[FFmpeg-devel] ffmpeg and argument parsing.

Marc Hoffman mmhoffm
Tue Sep 4 22:41:22 CEST 2007


This seems clearer, why are we using d==d to signal argument not found?

yoda:~/dev/ffmpeg mmh$ svn diff ffmpeg.c
Index: ffmpeg.c
===================================================================
--- ffmpeg.c    (revision 9768)
+++ ffmpeg.c    (working copy)
@@ -3090,9 +3090,9 @@
     oc->loop_output = loop_output;

     for(i=0; i<opt_name_count; i++){
-        const AVOption *opt;
+        const AVOption *opt = 0;
         double d = av_get_double(avformat_opts, opt_names[i], &opt);
-        if(d==d && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
+        if(opt && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
             av_set_double(oc, opt_names[i], d);
     }




More information about the ffmpeg-devel mailing list