]> git.sesse.net Git - vlc/blobdiff - modules/access_output/rtmp.c
macosx: ugly compilation fix as VLC_OBJECT_OPENGL was removed
[vlc] / modules / access_output / rtmp.c
index a482c037732c69860c20032c4c5b1548c8a833e8..8ff62bc4a48986a76ae3d0f81a738997c0a86f4a 100644 (file)
@@ -53,7 +53,7 @@ static void Close( vlc_object_t * );
 
 vlc_module_begin();
     set_description( N_("RTMP stream output") );
-    set_shortname( "RTMP" );
+    set_shortname( N_("RTMP" ) );
     set_capability( "sout access", 50 );
     set_category( CAT_SOUT );
     set_subcategory( SUBCAT_SOUT_STREAM );
@@ -68,7 +68,7 @@ vlc_module_end();
  *****************************************************************************/
 static ssize_t Write( sout_access_out_t *, block_t * );
 static int     Seek ( sout_access_out_t *, off_t  );
-static void ThreadControl( vlc_object_t * );
+static void* ThreadControl( vlc_object_t * );
 
 struct sout_access_out_sys_t
 {
@@ -173,7 +173,7 @@ static int Open( vlc_object_t *p_this )
         p_sys->p_thread->rtmp_headers_send[i].body = NULL;
     }
 
-    vlc_cond_init( p_sys->p_thread, &p_sys->p_thread->wait );
+    vlc_cond_init( &p_sys->p_thread->wait );
     vlc_mutex_init( &p_sys->p_thread->lock );
 
     p_sys->p_thread->result_connect = 1;
@@ -272,7 +272,6 @@ static void Close( vlc_object_t * p_this )
 //    p_sys->p_thread->b_die = true;
     vlc_object_kill( p_sys->p_thread );
     block_FifoWake( p_sys->p_thread->p_fifo_input );
-    block_FifoWake( p_sys->p_thread->p_empty_blocks );
 
     vlc_thread_join( p_sys->p_thread );
 
@@ -379,10 +378,11 @@ static int Seek( sout_access_out_t *p_access, off_t i_pos )
 /*****************************************************************************
  * ThreadControl: manage control messages and pipe media to Read
  *****************************************************************************/
-static void ThreadControl( vlc_object_t *p_this )
+static void* ThreadControl( vlc_object_t *p_this )
 {
     rtmp_control_thread_t *p_thread = (rtmp_control_thread_t *) p_this;
     rtmp_packet_t *rtmp_packet;
+    int canc = vlc_savecancel ();
 
     rtmp_init_handler( p_thread->rtmp_handler );
 
@@ -416,4 +416,6 @@ static void ThreadControl( vlc_object_t *p_this )
             p_thread->b_die = 1;
         }
     }
+    vlc_restorecancel (canc);
+    return NULL;
 }