From: RĂ©mi Denis-Courmont Date: Fri, 24 Aug 2007 15:50:00 +0000 (+0000) Subject: Don't return negative session number X-Git-Tag: 0.9.0-test0~6165 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b87f1bdc435b8600317ca01e4cf27f673d70cda8;p=vlc Don't return negative session number --- diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c index f6f749c8f4..46c5b3b3cb 100644 --- a/modules/stream_out/rtp.c +++ b/modules/stream_out/rtp.c @@ -499,7 +499,7 @@ static int Open( vlc_object_t *p_this ) asprintf( &p_sys->psz_sdp, "v=0\r\n" /* FIXME: source address not known :( */ - "o=- "I64Fd" %d IN IP%c %s\r\n" + "o=- "I64Fu" %d IN IP%c %s\r\n" "s=%s\r\n" "i=%s\r\n" "u=%s\r\n" @@ -771,7 +771,7 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url ) p = psz_sdp = malloc( i_size ); p += sprintf( p, "v=0\r\n" ); - p += sprintf( p, "o=- "I64Fd" %d IN IP%c %s\r\n", + p += sprintf( p, "o=- "I64Fu" %d IN IP%c %s\r\n", p_sys->i_sdp_id, p_sys->i_sdp_version, ipv, ipv == '6' ? "::1" : "127.0.0.1" ); if( *p_sys->psz_session_name ) diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c index 5d252581b8..1786ec29af 100644 --- a/modules/stream_out/rtsp.c +++ b/modules/stream_out/rtsp.c @@ -439,7 +439,7 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args, if( psz_session == NULL ) { /* FIXME: should be somewhat secure randomness */ - snprintf( psz_session_init, sizeof(psz_session_init), I64Fd, + snprintf( psz_session_init, sizeof(psz_session_init), I64Fu, NTPtime64() + rand() ); }