]> git.sesse.net Git - vlc/commitdiff
RTMP: tag some of the obvious bugs
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Nov 2009 19:28:44 +0000 (21:28 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Nov 2009 19:28:44 +0000 (21:28 +0200)
modules/access/rtmp/access.c
modules/access/rtmp/rtmp_amf_flv.c
modules/access_output/rtmp.c

index 5aa3e47d892898f755f9f53035496de33b0d4088..e91c3c0088b4a88a7dc93c5cd70f8ba74e8edd96 100644 (file)
@@ -351,8 +351,10 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
             if( !p_sys->p_thread->metadata_received )
             {
                 /* Wait until enough data is received for extracting metadata */
+#warning This is not thread-safe (because block_FifoCount() is not)!
                 if( block_FifoCount( p_sys->p_thread->p_fifo_input ) < 10 )
                 {
+#warning This is wrong!
                     msleep(100000);
                     continue;
                 }
@@ -549,6 +551,7 @@ static void* ThreadControl( vlc_object_t *p_this )
             /* Sometimes server close connection too soon */
             if( p_thread->result_connect )
             {
+#warning There must be a bug here!
                 vlc_mutex_lock( &p_thread->lock );
                 vlc_cond_signal( &p_thread->wait );
                 vlc_mutex_unlock( &p_thread->lock );
index 3926fd8c1225a9037c4d07db2d53993d7bd57d14..bf2b83b7f0a63cf3c6cd5f92006e16d02e572ffc 100644 (file)
@@ -1277,6 +1277,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet
                     msg_Dbg( p_thread, "key: %s value: %s", string, string2 );
                     if( strcmp( "code", string ) == 0 )
                     {
+#warning Locking bugs here.
                         if( strcmp( "NetConnection.Connect.Success", string2 ) == 0 )
                         {
                             p_thread->result_connect = 0;
index 39944466048f56ae10aec598efd5b7e77892dab5..8c8b7993e04a4941094df430c2a6350c8740c707 100644 (file)
@@ -404,6 +404,7 @@ static void* ThreadControl( vlc_object_t *p_this )
         else
         {
             /* Sometimes server close connection too soon */
+#warning Locking bug here.
             if( p_thread->result_connect )
             {
                 vlc_mutex_lock( &p_thread->lock );