Don't return negative session number
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 24 Aug 2007 15:50:00 +0000 (15:50 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 24 Aug 2007 15:50:00 +0000 (15:50 +0000)
modules/stream_out/rtp.c
modules/stream_out/rtsp.c

index f6f749c..46c5b3b 100644 (file)
@@ -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 )
index 5d25258..1786ec2 100644 (file)
@@ -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() );
     }