[FFmpeg-cvslog] r12472 - trunk/ffmpeg.c

benoit subversion
Mon Mar 17 10:33:21 CET 2008


Author: benoit
Date: Mon Mar 17 10:33:21 2008
New Revision: 12472

Log:
Provide a context to parse_time_or_die().
Patch by Stefano Sabatini: stefano sabatini-lala poste it


Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Mon Mar 17 10:33:21 2008
@@ -2580,12 +2580,12 @@ static void opt_map_meta_data(const char
     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;
@@ -2593,22 +2593,22 @@ static int64_t parse_time_or_die(const c
 
 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)




More information about the ffmpeg-cvslog mailing list