rename arguments for compatibility with old version

This commit is contained in:
James Laird
2013-04-02 10:09:48 +11:00
parent 9b9899b843
commit 7db07766d3
+5 -5
View File
@@ -55,9 +55,9 @@ void usage(char *progname) {
printf("Available options:\n"
" -h show this help\n"
" -p port set RTSP listening port\n"
" -n name set advertised name\n"
" -a name set advertised name\n"
" -o output set audio output\n"
" -s fill set how full the buffer must be before audio output starts\n"
" -b fill set how full the buffer must be before audio output starts\n"
" This value is in frames; default %d\n"
"Run %s -o <output> -h to find the available options for a specific output\n"
"\n", config.buffer_start_fill, progname);
@@ -74,7 +74,7 @@ void usage(char *progname) {
int parse_options(int argc, char **argv) {
char opt;
while ((opt = getopt(argc, argv, "+hp:n:o:s:")) > 0) {
while ((opt = getopt(argc, argv, "+hp:a:o:b:")) > 0) {
switch (opt) {
default:
printf("Unknown argument -%c\n", optopt);
@@ -87,13 +87,13 @@ int parse_options(int argc, char **argv) {
case 'p':
config.port = atoi(optarg);
break;
case 'n':
case 'a':
config.apname = optarg;
break;
case 'o':
config.output_name = optarg;
break;
case 's':
case 'v':
config.buffer_start_fill = atoi(optarg);
break;
}