From 451c0bc9eaf408ffdc883d63e04f74622a89259d Mon Sep 17 00:00:00 2001 From: bnnm Date: Mon, 12 Aug 2019 21:40:55 +0200 Subject: [PATCH] Fix vgmstream123 --- cli/vgmstream123.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cli/vgmstream123.c b/cli/vgmstream123.c index d9e1a4cd..a4a84b2e 100644 --- a/cli/vgmstream123.c +++ b/cli/vgmstream123.c @@ -630,7 +630,7 @@ int main(int argc, char **argv) { goto done; } - again: +again: { 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) { switch (opt) { + case 1: + if (play_file(optarg, &par)) { + status = 1; + goto done; + } + break; case '@': if (play_playlist(optarg, &par)) { status = 1; @@ -689,9 +695,12 @@ int main(int argc, char **argv) { verbose = 1; break; default: + VGM_LOG("vgmstream123: unknown opt %x", opt); goto done; } } + + /* try to read infile here in case getopt didn't pass "1" to the above switch I guess */ argc -= optind; argv += optind; @@ -707,7 +716,7 @@ int main(int argc, char **argv) { goto again; } - done: +done: if (device) ao_close(device);