]> git.sesse.net Git - ffmpeg/blobdiff - ffplay.c
Speed up show_list
[ffmpeg] / ffplay.c
index f39fdb134362a9ce6c69b5d1673311331cec81e4..2804cf6872089e954949e8cc4ead9163b2472d7d 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -22,6 +22,7 @@
 #include <math.h>
 #include <limits.h>
 #include "avformat.h"
+#include "rtsp.h"
 #include "swscale.h"
 #include "avstring.h"
 
@@ -37,6 +38,9 @@
 
 #undef exit
 
+static const char program_name[] = "FFplay";
+static const int program_birth_year = 2003;
+
 //#define DEBUG_SYNC
 
 #define MAX_VIDEOQ_SIZE (5 * 256 * 1024)
@@ -1974,7 +1978,7 @@ static int decode_thread(void *arg)
                 av_read_play(ic);
         }
 #ifdef CONFIG_RTSP_DEMUXER
-        if (is->paused && ic->iformat == &rtsp_demuxer) {
+        if (is->paused && !strcmp(ic->iformat->name, "rtsp")) {
             /* wait 10 ms to avoid trying to get another packet */
             /* XXX: horrible */
             SDL_Delay(10);
@@ -2406,6 +2410,10 @@ static void opt_sync(const char *arg)
 static void opt_seek(const char *arg)
 {
     start_time = parse_date(arg, 1);
+    if (start_time == INT64_MIN) {
+        fprintf(stderr, "Invalid duration specification: %s\n", arg);
+        exit(1);
+    }
 }
 
 static void opt_debug(const char *arg)
@@ -2472,8 +2480,7 @@ const OptionDef options[] = {
 
 void show_help(void)
 {
-    printf("ffplay version " FFMPEG_VERSION ", Copyright (c) 2003-2007 Fabrice Bellard, et al.\n"
-           "usage: ffplay [options] input_file\n"
+    printf("usage: ffplay [options] input_file\n"
            "Simple media player\n");
     printf("\n");
     show_help_options(options, "Main options:\n",
@@ -2509,6 +2516,8 @@ int main(int argc, char **argv)
     /* register all codecs, demux and protocols */
     av_register_all();
 
+    show_banner(program_name, program_birth_year);
+
     parse_options(argc, argv, options, opt_input_file);
 
     if (!input_filename) {