]> git.sesse.net Git - vlc/blobdiff - modules/access_output/udp.c
Silent hack to avoid crash when MTU is too small
[vlc] / modules / access_output / udp.c
index dc47a7e0f6a090ce772f710be10ad9f807180b76..c1252b5a2e558adf60107c42c226bdab745de722 100644 (file)
@@ -374,6 +374,8 @@ static int Open( vlc_object_t *p_this )
         var_GetInteger( p_access, SOUT_CFG_PREFIX "group" );
 
     p_sys->i_mtu = var_CreateGetInteger( p_this, "mtu" );
+    if( p_sys->b_rtpts && ( p_sys->i_mtu < RTP_HEADER_LENGTH ) )
+        p_sys->i_mtu += RTP_HEADER_LENGTH;
 
     srand( (uint32_t)mdate());
     p_sys->p_buffer          = NULL;