|
From: Michel Promonet <michel.promonet@free.fr>
|
|
Subject: [PATCH] Fix crash formating time_t as long (it is a long long)
|
|
Signed-off-by: Michel Promonet <michel.promonet@free.fr>
|
|
|
|
---
|
|
--- a/live/liveMedia/ServerMediaSession.cpp
|
|
+++ b/live/liveMedia/ServerMediaSession.cpp
|
|
@@ -271,7 +271,7 @@ char* ServerMediaSession::generateSDPDes
|
|
|
|
char const* const sdpPrefixFmt =
|
|
"v=0\r\n"
|
|
- "o=- %ld%06ld %d IN %s %s\r\n"
|
|
+ "o=- %lld%06lld %d IN %s %s\r\n"
|
|
"s=%s\r\n"
|
|
"i=%s\r\n"
|
|
"t=0 0\r\n"
|
|
@@ -299,7 +299,7 @@ char* ServerMediaSession::generateSDPDes
|
|
|
|
// Generate the SDP prefix (session-level lines):
|
|
snprintf(sdp, sdpLength, sdpPrefixFmt,
|
|
- fCreationTime.tv_sec, fCreationTime.tv_usec, // o= <session id>
|
|
+ (long long)fCreationTime.tv_sec, (long long)fCreationTime.tv_usec, // o= <session id>
|
|
1, // o= <version> // (needs to change if params are modified)
|
|
addressFamily == AF_INET ? "IP4" : "IP6", // o= <address family>
|
|
ipAddressStr.val(), // o= <address>
|