From c41050be5a7662eb6e317d1b5cf81870b27ed35d Mon Sep 17 00:00:00 2001 From: Michel Promonet Date: Sun, 10 Dec 2017 12:31:41 +0100 Subject: [PATCH] set default port with PORT variable --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index b5572cb..61238d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -388,6 +388,10 @@ int main(int argc, char** argv) #ifdef HAVE_ALSA snd_pcm_format_t audioFmt = SND_PCM_FORMAT_S16_BE; #endif + const char* defaultPort = getenv("PORT"); + if (defaultPort != NULL) { + rtspPort = atoi(defaultPort); + } // decode parameters int c = 0;