You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.0 KiB

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