take the filename specified on the command line as default stream name

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@863 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-05-14 16:17:17 +00:00
parent a414cc2f32
commit cfb082a67c

View file

@ -534,12 +534,6 @@ int main(int argc, char *argv[]) {
}
}
if (!client_name)
client_name = strdup(bn);
if (!stream_name)
stream_name = strdup(client_name);
if (!pa_sample_spec_valid(&sample_spec)) {
fprintf(stderr, "Invalid sample specification\n");
goto quit;
@ -571,12 +565,22 @@ int main(int argc, char *argv[]) {
}
close(fd);
if (!stream_name)
stream_name = strdup(argv[optind]);
} else {
fprintf(stderr, "Too many arguments.\n");
goto quit;
}
}
if (!client_name)
client_name = strdup(bn);
if (!stream_name)
stream_name = strdup(client_name);
/* Set up a new main loop */
if (!(m = pa_mainloop_new())) {
fprintf(stderr, "pa_mainloop_new() failed.\n");