]> git.sesse.net Git - ffmpeg/blobdiff - cmdutils.c
Cosmetics: Replace -1 with PIX_FMT_NONE.
[ffmpeg] / cmdutils.c
index e3497a2ea43c6040677647459b3633440200c07d..f7b8da6f92b28b01ef2ca90d80a6e7c028466e73 100644 (file)
@@ -54,7 +54,7 @@
 struct SwsContext *sws_opts;
 AVDictionary *format_opts, *codec_opts;
 
-static const int this_year = 2011;
+static const int this_year = 2012;
 
 static FILE *report_file;
 
@@ -510,6 +510,20 @@ int opt_report(const char *opt)
     return 0;
 }
 
+int opt_max_alloc(const char *opt, const char *arg)
+{
+    char *tail;
+    size_t max;
+
+    max = strtol(arg, &tail, 10);
+    if (*tail) {
+        av_log(NULL, AV_LOG_FATAL, "Invalid max_alloc \"%s\".\n", arg);
+        exit_program(1);
+    }
+    av_max_alloc(max);
+    return 0;
+}
+
 int opt_codec_debug(const char *opt, const char *arg)
 {
     av_log_set_level(AV_LOG_DEBUG);
@@ -550,7 +564,7 @@ static int warned_cfg = 0;
         const char *indent = flags & INDENT? "  " : "";                 \
         if (flags & SHOW_VERSION) {                                     \
             unsigned int version = libname##_version();                 \
-            av_log(NULL, level, "%slib%-9s %2d.%3d.%2d / %2d.%3d.%2d\n",\
+            av_log(NULL, level, "%slib%-11s %2d.%3d.%3d / %2d.%3d.%3d\n",\
                    indent, #libname,                                    \
                    LIB##LIBNAME##_VERSION_MAJOR,                        \
                    LIB##LIBNAME##_VERSION_MINOR,                        \
@@ -1020,8 +1034,9 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
 
             if (*endptr++ == ':') {
                 int stream_idx = strtol(endptr, NULL, 0);
-                return (stream_idx >= 0 && stream_idx < s->programs[i]->nb_stream_indexes &&
-                        st->index == s->programs[i]->stream_index[stream_idx]);
+                return stream_idx >= 0 &&
+                    stream_idx < s->programs[i]->nb_stream_indexes &&
+                    st->index == s->programs[i]->stream_index[stream_idx];
             }
 
             for (j = 0; j < s->programs[i]->nb_stream_indexes; j++)