Commit 824481bc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Also try to send twice without splice().

This means ICMP errors will be ignored, which is a Bad Idea.
But people are likely to complain about how it breaks their setup if we
don't ignore ICMP anyway.
parent 8ab4e57b
...@@ -1390,13 +1390,20 @@ static void ThreadSend( vlc_object_t *p_this ) ...@@ -1390,13 +1390,20 @@ static void ThreadSend( vlc_object_t *p_this )
if( splice( fd[2], NULL, id->sinkv[i].rtp_fd, NULL, len, if( splice( fd[2], NULL, id->sinkv[i].rtp_fd, NULL, len,
SPLICE_F_NONBLOCK ) >= 0 ) SPLICE_F_NONBLOCK ) >= 0 )
continue; continue;
if( errno == EAGAIN )
continue;
/* splice failed */ /* splice failed */
splice( fd[2], NULL, fd[4], NULL, len, 0 ); splice( fd[2], NULL, fd[4], NULL, len, 0 );
#else
if( send( id->sinkv[i].rtp_fd, out->p_buffer, len, 0 ) >= 0 )
continue;
#endif #endif
if( ( send( id->sinkv[i].rtp_fd, out->p_buffer, len, 0 ) < 0 ) /* Retry sending to root out soft-errors */
&& ( errno != EAGAIN ) ) if( send( id->sinkv[i].rtp_fd, out->p_buffer, len, 0 ) >= 0 )
deadv[deadc++] = id->sinkv[i].rtp_fd; continue;
deadv[deadc++] = id->sinkv[i].rtp_fd;
} }
vlc_mutex_unlock( &id->lock_sink ); vlc_mutex_unlock( &id->lock_sink );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment