Fix vgmstream123

This commit is contained in:
bnnm 2019-08-12 21:40:55 +02:00
parent d57b986523
commit 451c0bc9ea

View File

@ -630,7 +630,7 @@ int main(int argc, char **argv) {
goto done; goto done;
} }
again: again:
{ {
struct params default_par = DEFAULT_PARAMS; struct params default_par = DEFAULT_PARAMS;
@ -639,6 +639,12 @@ int main(int argc, char **argv) {
while ((opt = getopt(argc, argv, "-D:F:L:M:S:b:d:f:o:@:hrv")) != -1) { while ((opt = getopt(argc, argv, "-D:F:L:M:S:b:d:f:o:@:hrv")) != -1) {
switch (opt) { switch (opt) {
case 1:
if (play_file(optarg, &par)) {
status = 1;
goto done;
}
break;
case '@': case '@':
if (play_playlist(optarg, &par)) { if (play_playlist(optarg, &par)) {
status = 1; status = 1;
@ -689,9 +695,12 @@ int main(int argc, char **argv) {
verbose = 1; verbose = 1;
break; break;
default: default:
VGM_LOG("vgmstream123: unknown opt %x", opt);
goto done; goto done;
} }
} }
/* try to read infile here in case getopt didn't pass "1" to the above switch I guess */
argc -= optind; argc -= optind;
argv += optind; argv += optind;
@ -707,7 +716,7 @@ int main(int argc, char **argv) {
goto again; goto again;
} }
done: done:
if (device) if (device)
ao_close(device); ao_close(device);