]> git.sesse.net Git - vlc/commitdiff
* udp: increase the mtu by *2 instead of 10%.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 6 Jun 2004 13:53:53 +0000 (13:53 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 6 Jun 2004 13:53:53 +0000 (13:53 +0000)
modules/access/udp.c

index ceafde706259907914011c7e5b42714d5cefb9e5..c59f33d9ed9a057297e791c8e56c1fdd3ec5a4b1 100644 (file)
@@ -321,10 +321,11 @@ static block_t *BlockUDP( access_t *p_access )
         return NULL;
     }
 
-    if( p_block->i_buffer >= p_sys->i_mtu && p_sys->b_auto_mtu )
+    if( p_block->i_buffer >= p_sys->i_mtu && p_sys->b_auto_mtu &&
+        p_sys->i_mtu < 32767 )
     {
-        /* Increase by 10% */
-        p_sys->i_mtu += ( p_sys->i_mtu + 9 ) / 10;
+        /* Increase by 100% */
+        p_sys->i_mtu *= 2;
         msg_Dbg( p_access, "increasing MTU to %d", p_sys->i_mtu );
     }