From 85756c137f75901cca3166e5b14d3be982887491 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 22 Jun 2003 09:50:25 +0000 Subject: [PATCH] mkvextract outputs the usage information if no input filename was given. --- mkvextract.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mkvextract.cpp b/mkvextract.cpp index 0cc656ab4..0eb305eb2 100644 --- a/mkvextract.cpp +++ b/mkvextract.cpp @@ -127,7 +127,7 @@ char typenames[14][20] = {"unknown", "Ogg" "AVI", "WAV", "SRT", "MP3", "AC3", void usage() { fprintf(stdout, - "Usage: mkvextract -i inname [TID1:outname1 [TID2:outname2]]\n\n" + "Usage: mkvextract -i inname [TID1:outname1 [TID2:outname2 ...]]\n\n" " -i inname Use 'inname' as the source.\n" " -c charset Convert text subtitles to this charset.\n" " TID:outname Write track with the ID TID to 'outname'.\n" @@ -209,8 +209,9 @@ void parse_args(int argc, char **argv, char *&file_name) { } if (file_name == NULL) { - fprintf(stderr, "Error: No input file given.\n"); - exit(1); + fprintf(stderr, "Error: No input file given.\n\n"); + usage(); + exit(0); } if (tracks.size() == 0) {