summaryrefslogtreecommitdiff
path: root/tools/sdp.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/sdp.h')
-rw-r--r--tools/sdp.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/tools/sdp.h b/tools/sdp.h
index e56f1ebd..47a3a409 100644
--- a/tools/sdp.h
+++ b/tools/sdp.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: sdp.h,v 1.2.2.1 2009-02-12 11:08:15 phintuka Exp $
+ * $Id: sdp.h,v 1.2 2006-12-14 12:52:49 phintuka Exp $
*
*/
@@ -15,16 +15,16 @@
#define SDP_MIME_TYPE "application/sdp"
-static const char *vdr_sdp_description(const char *vdr_ip,
- int vdr_svdrp_port,
- int vdr_xineliboutput_port,
- const char *rtp_ip,
- uint32_t rtp_ssrc,
- int rtp_port,
- int rtp_ttl)
+static char *vdr_sdp_description(const char *vdr_ip,
+ int vdr_svdrp_port,
+ int vdr_xineliboutput_port,
+ const char *rtp_ip,
+ uint32_t rtp_ssrc,
+ int rtp_port,
+ int rtp_ttl)
{
static uint8_t s_serial = 0;
- static cString s_data;
+ static char *s_data = NULL;
static char s_hostname[257] = {0};
uint64_t serial = (time(NULL) << 2) + ((s_serial++) & 0x03);
@@ -32,7 +32,9 @@ static const char *vdr_sdp_description(const char *vdr_ip,
if(!s_hostname[0])
gethostname(s_hostname, 256);
- s_data = cString::sprintf(
+ free(s_data);
+
+ asprintf(&s_data,
/*** session ***/
/* version */ "v=0"
/* origin */ "\r\n" "o=%s %u %"PRIu64" IN IP4 %s"
@@ -84,7 +86,8 @@ static const char *vdr_sdp_description(const char *vdr_ip,
/* tcp control/x-svdrp */
, vdr_ip
, vdr_svdrp_port
- );
+ );
+
return s_data;
}