]> git.sesse.net Git - ffmpeg/blobdiff - cmdutils.c
Fix use of sstep/dstep in ff_iir_filter().
[ffmpeg] / cmdutils.c
index 7903e271140d022e202223e328563c6a4bc9366e..a77e6e67b8a709191174bd30b4fb2f147ac31a99 100644 (file)
@@ -63,7 +63,9 @@ void init_opts(void)
     for (i = 0; i < AVMEDIA_TYPE_NB; i++)
         avcodec_opts[i] = avcodec_alloc_context2(i);
     avformat_opts = avformat_alloc_context();
+#if CONFIG_SWSCALE
     sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, NULL, NULL, NULL);
+#endif
 }
 
 void uninit_opts(void)
@@ -73,7 +75,9 @@ void uninit_opts(void)
         av_freep(&avcodec_opts[i]);
     av_freep(&avformat_opts->key);
     av_freep(&avformat_opts);
+#if CONFIG_SWSCALE
     av_freep(&sws_opts);
+#endif
 }
 
 void log_callback_help(void* ptr, int level, const char* fmt, va_list vl)
@@ -194,7 +198,7 @@ unknown_opt:
             } else if (po->flags & OPT_INT64) {
                 *po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);
             } else if (po->flags & OPT_FLOAT) {
-                *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -1.0/0.0, 1.0/0.0);
+                *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);
             } else if (po->flags & OPT_FUNC2) {
                 if (po->u.func2_arg(opt, arg) < 0) {
                     fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);