#include <math.h>
#include <limits.h>
#include "avformat.h"
+#include "rtsp.h"
#include "swscale.h"
#include "avstring.h"
#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)
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);
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)
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",
/* 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) {