[vlc-devel] commit: RTMP: tag some of the obvious bugs ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Nov 17 20:35:18 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 17 21:28:44 2009 +0200| [88ae87b2a0a78fb4f2ca7151382f8b09100c191f] | committer: Rémi Denis-Courmont 

RTMP: tag some of the obvious bugs

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=88ae87b2a0a78fb4f2ca7151382f8b09100c191f
---

 modules/access/rtmp/access.c       |    3 +++
 modules/access/rtmp/rtmp_amf_flv.c |    1 +
 modules/access_output/rtmp.c       |    1 +
 3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/access/rtmp/access.c b/modules/access/rtmp/access.c
index 5aa3e47..e91c3c0 100644
--- a/modules/access/rtmp/access.c
+++ b/modules/access/rtmp/access.c
@@ -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 );
diff --git a/modules/access/rtmp/rtmp_amf_flv.c b/modules/access/rtmp/rtmp_amf_flv.c
index 3926fd8..bf2b83b 100644
--- a/modules/access/rtmp/rtmp_amf_flv.c
+++ b/modules/access/rtmp/rtmp_amf_flv.c
@@ -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;
diff --git a/modules/access_output/rtmp.c b/modules/access_output/rtmp.c
index 3994446..8c8b799 100644
--- a/modules/access_output/rtmp.c
+++ b/modules/access_output/rtmp.c
@@ -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 );




More information about the vlc-devel mailing list