]> git.sesse.net Git - vlc/commitdiff
* modules/access_output/udp.c: More verbosity when the mux itself is late.
authorChristophe Massiot <massiot@videolan.org>
Tue, 7 Jun 2005 16:40:12 +0000 (16:40 +0000)
committerChristophe Massiot <massiot@videolan.org>
Tue, 7 Jun 2005 16:40:12 +0000 (16:40 +0000)
modules/access_output/udp.c

index a64f4defe1c22b88f9b46760f6a5dae53c61a992..cec3b199a777dbc06ea9d2c209aedb4dc2654763 100644 (file)
@@ -364,6 +364,12 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
         if( p_sys->p_buffer &&
             p_sys->p_buffer->i_buffer + p_buffer->i_buffer > p_sys->i_mtu )
         {
+            if( p_sys->p_buffer->i_dts + p_sys->p_thread->i_caching < mdate() )
+            {
+                msg_Dbg( p_access, "late packet for udp input (" I64Fd ")",
+                         mdate() - p_sys->p_buffer->i_dts
+                          - p_sys->p_thread->i_caching );
+            }
             block_FifoPut( p_sys->p_thread->p_fifo, p_sys->p_buffer );
             p_sys->p_buffer = NULL;
         }
@@ -396,6 +402,13 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
             if( p_sys->p_buffer->i_buffer == p_sys->i_mtu || i_packets > 1 )
             {
                 /* Flush */
+                if( p_sys->p_buffer->i_dts + p_sys->p_thread->i_caching
+                      < mdate() )
+                {
+                    msg_Dbg( p_access, "late packet for udp input (" I64Fd ")",
+                             mdate() - p_sys->p_buffer->i_dts
+                              - p_sys->p_thread->i_caching );
+                }
                 block_FifoPut( p_sys->p_thread->p_fifo, p_sys->p_buffer );
                 p_sys->p_buffer = NULL;
             }
@@ -533,7 +546,7 @@ static void ThreadWrite( vlc_object_t *p_this )
                 i_dropped_packets++;
                 continue;
             }
-            else if( i_date - i_date_last < 0 )
+            else if( i_date - i_date_last < -1000 )
             {
                 if( !i_dropped_packets )
                     msg_Dbg( p_thread, "mmh, packets in the past ("I64Fd")",