]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg.c
Reindent after rtsp-alternate-protocol* patches.
[ffmpeg] / ffmpeg.c
index 3cce5cedd7e788065f8f03f8f443721f57a6fd8f..5bce6e0185ed6c6811cb32fc0611ecbc294aa6cf 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
 #undef NDEBUG
 #include <assert.h>
 
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif
-
 #undef exit
 
 static const char program_name[] = "FFmpeg";
@@ -210,7 +206,7 @@ static uint64_t limit_filesize = 0; //
 static int pgmyuv_compatibility_hack=0;
 static float dts_delta_threshold = 10;
 
-static int sws_flags = SWS_BICUBIC;
+static unsigned int sws_flags = SWS_BICUBIC;
 
 static const char **opt_names;
 static int opt_name_count;
@@ -876,7 +872,6 @@ static void do_video_out(AVFormatContext *s,
 }
 
 static double psnr(double d){
-    if(d==0) return INFINITY;
     return -10.0*log(d)/log(10.0);
 }
 
@@ -1597,6 +1592,8 @@ static int av_encode(AVFormatContext **output_files,
             av_strlcpy(ost->st->language, ist->st->language,
                        sizeof(ost->st->language));
 
+        ost->st->disposition = ist->st->disposition;
+
         if (ost->st->stream_copy) {
             /* if stream_copy is selected, no need to decode or encode */
             codec->codec_id = icodec->codec_id;
@@ -2583,12 +2580,12 @@ static void opt_map_meta_data(const char *arg)
     m->in_file = strtol(p, &p, 0);
 }
 
-static int64_t parse_time_or_die(const char *timestr, int is_duration)
+static int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration)
 {
     int64_t us = parse_date(timestr, is_duration);
     if (us == INT64_MIN) {
-        fprintf(stderr, "Invalid %s specification: %s\n",
-                is_duration ? "duration" : "date", timestr);
+        fprintf(stderr, "Invalid %s specification for %s: %s\n",
+                is_duration ? "duration" : "date", context, timestr);
         exit(1);
     }
     return us;
@@ -2596,22 +2593,22 @@ static int64_t parse_time_or_die(const char *timestr, int is_duration)
 
 static void opt_recording_time(const char *arg)
 {
-    recording_time = parse_time_or_die(arg, 1);
+    recording_time = parse_time_or_die("t", arg, 1);
 }
 
 static void opt_start_time(const char *arg)
 {
-    start_time = parse_time_or_die(arg, 1);
+    start_time = parse_time_or_die("ss", arg, 1);
 }
 
 static void opt_rec_timestamp(const char *arg)
 {
-    rec_timestamp = parse_time_or_die(arg, 0) / 1000000;
+    rec_timestamp = parse_time_or_die("timestamp", arg, 0) / 1000000;
 }
 
 static void opt_input_ts_offset(const char *arg)
 {
-    input_ts_offset = parse_time_or_die(arg, 1);
+    input_ts_offset = parse_time_or_die("itsoffset", arg, 1);
 }
 
 static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
@@ -3756,7 +3753,7 @@ const OptionDef options[] = {
     { "re", OPT_BOOL | OPT_EXPERT, {(void*)&rate_emu}, "read input at native frame rate", "" },
     { "loop_input", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "loop (current only works with images)" },
     { "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "number of times to loop output in formats that support looping (0 loops forever)", "" },
-    { "v", HAS_ARG, {(void*)opt_verbose}, "control amount of logging", "verbose" },
+    { "v", HAS_ARG, {(void*)opt_verbose}, "set the logging verbosity level", "number" },
     { "target", HAS_ARG, {(void*)opt_target}, "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \"pal-vcd\", \"ntsc-svcd\", ...)", "type" },
     { "threads", HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
     { "vsync", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&video_sync_method}, "video sync method", "" },