set default port with PORT variable

This commit is contained in:
Michel Promonet 2017-12-10 12:31:41 +01:00
parent a9e33f504c
commit c41050be5a

View File

@ -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;