]> git.sesse.net Git - vlc/blobdiff - modules/access_output/udp.c
make deinterlace and zoom work together
[vlc] / modules / access_output / udp.c
index 8a98dbf2bbf1ff86567409fa2ad09cfb5118a0e3..ce7cc7b385a1395dd593c2b970e6598e55e1e810 100644 (file)
@@ -199,8 +199,6 @@ static int Open( vlc_object_t *p_this )
     if( p_access->psz_access != NULL &&
         !strcmp( p_access->psz_access, "rtp" ) )
     {
-        msg_Warn( p_access, "be careful that rtp output only works with ts "
-                  "payload (not an error)" );
         p_sys->b_rtpts = 1;
     }
     else
@@ -449,6 +447,20 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
 static int WriteRaw( sout_access_out_t *p_access, block_t *p_buffer )
 {
     sout_access_out_sys_t   *p_sys = p_access->p_sys;
+    block_t *p_buf;
+
+    vlc_mutex_lock( &p_sys->p_thread->blocks_lock );
+    while ( p_sys->p_thread->i_empty_depth >= MAX_EMPTY_BLOCKS )
+    {
+        p_buf = p_sys->p_thread->p_empty_blocks;
+        p_sys->p_thread->p_empty_blocks =
+                    p_sys->p_thread->p_empty_blocks->p_next;
+        p_sys->p_thread->i_empty_depth--;
+        vlc_mutex_unlock( &p_sys->p_thread->blocks_lock );
+        block_Release( p_buf );
+        vlc_mutex_lock( &p_sys->p_thread->blocks_lock );
+    }
+    vlc_mutex_unlock( &p_sys->p_thread->blocks_lock );
 
     block_FifoPut( p_sys->p_thread->p_fifo, p_buffer );