diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-05 04:04:27 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-05 05:10:45 +0400 |
commit | d2084402e6034e8d49ea50ebe212c4e8783d028a (patch) | |
tree | 4887311120f2f7f5bdd105c919e60615ec9f53fb /ffplay.c | |
parent | b881a2e254f3948a2ff1775a7e2ae58abdef96b6 (diff) | |
parent | fb47997edb9d8ff16fc380d005a08c0545624aa6 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavc: fix type for thread_type option
avconv: move format to options context
avconv: move limit_filesize to options context
avconv: move start_time, recording_time and input_ts_offset to options context
avconv: add a context for options.
cmdutils: allow storing per-stream/chapter/.... options in a generic way
cmdutils: split per-option code out of parse_options().
cmdutils: add support for caller-provided option context.
cmdutils: declare only one pointer type in OptionDef
cmdutils: move grow_array() from avconv to cmdutils.
cmdutils: move exit_program() declaration to cmdutils from avconv
http: Consider the stream as seekable if the reply contains Accept-Ranges: bytes
nutenc: add namespace to the api facing functions
Conflicts:
avconv.c
cmdutils.c
cmdutils.h
ffmpeg.c
ffplay.c
ffprobe.c
ffserver.c
libavformat/http.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -277,6 +277,11 @@ static AVPacket flush_pkt; static SDL_Surface *screen; +void exit_program(int ret) +{ + exit(ret); +} + static int packet_queue_put(PacketQueue *q, AVPacket *pkt) { AVPacketList *pkt1; @@ -2891,19 +2896,20 @@ static int opt_show_mode(const char *opt, const char *arg) return 0; } -static int opt_input_file(const char *opt, const char *filename) +static void opt_input_file(void *optctx, const char *filename) { if (input_filename) { fprintf(stderr, "Argument '%s' provided as input filename, but '%s' was already specified.\n", filename, input_filename); - exit(1); + exit_program(1); } if (!strcmp(filename, "-")) filename = "pipe:"; input_filename = filename; - return 0; } +static int dummy; + static const OptionDef options[] = { #include "cmdutils_common_opts.h" { "x", HAS_ARG, {(void*)opt_width}, "force displayed width", "width" }, @@ -2947,7 +2953,7 @@ static const OptionDef options[] = { { "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, {(void*)&rdftspeed}, "rdft speed", "msecs" }, { "showmode", HAS_ARG, {(void*)opt_show_mode}, "select show mode (0 = video, 1 = waves, 2 = RDFT)", "mode" }, { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" }, - { "i", HAS_ARG, {(void *)opt_input_file}, "read specified file", "input_file"}, + { "i", OPT_BOOL, {(void *)&dummy}, "read specified file", "input_file"}, { NULL, }, }; @@ -3038,7 +3044,7 @@ int main(int argc, char **argv) show_banner(); - parse_options(argc, argv, options, opt_input_file); + parse_options(NULL, argc, argv, options, opt_input_file); if (!input_filename) { show_usage(); |