From 4051b3bdf3572dcfedba91179d0c8c2cdc720b3d Mon Sep 17 00:00:00 2001 From: mpromonet Date: Sun, 22 Nov 2020 11:39:33 +0000 Subject: [PATCH] allow -m without arg --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 39f29c1..6100340 100755 --- a/main.cpp +++ b/main.cpp @@ -255,7 +255,7 @@ int main(int argc, char** argv) // decode parameters int c = 0; - while ((c = getopt (argc, argv, "v::Q:O:b:" "I:P:p:m:u:M:ct:S::" "R:U:" "rwBsf::F:W:H:G:" "A:C:a:" "Vh")) != -1) + while ((c = getopt (argc, argv, "v::Q:O:b:" "I:P:p:m::u:M:ct:S::" "R:U:" "rwBsf::F:W:H:G:" "A:C:a:" "Vh")) != -1) { switch (c) { @@ -269,7 +269,7 @@ int main(int argc, char** argv) case 'P': rtspPort = atoi(optarg); break; case 'p': rtspOverHTTPPort = atoi(optarg); break; case 'u': url = optarg; break; - case 'm': multicast = true; murl = optarg; break; + case 'm': multicast = true; murl = optarg ? optarg : murl; break; case 'M': multicast = true; maddr = optarg; break; case 'c': repeatConfig = false; break; case 't': timeout = atoi(optarg); break;