X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fstream_output%2Fsap.c;fp=src%2Fstream_output%2Fsap.c;h=b23e71dc79630606fca7a73812adb30a777826fe;hb=97e5286b45b68345a40f7e5f39e0a80e7ba7ad07;hp=fc84ed7961da53971473514cbc762f17ca68fb82;hpb=867a815956401f12780892c3432d915ff470ff4e;p=vlc diff --git a/src/stream_output/sap.c b/src/stream_output/sap.c index fc84ed7961..b23e71dc79 100644 --- a/src/stream_output/sap.c +++ b/src/stream_output/sap.c @@ -197,6 +197,8 @@ static void * RunThread( vlc_object_t *p_this) { int i; + msleep( SAP_IDLE ); + /* If needed, get the rate info */ if( p_sap->b_control == true ) { @@ -222,11 +224,9 @@ static void * RunThread( vlc_object_t *p_this) else { vlc_object_unlock( p_sap ); - msleep( SAP_IDLE ); continue; } p_session = p_sap->pp_sessions[p_sap->i_current_session]; - vlc_object_unlock( p_sap ); /* And announce it */ if( p_session->p_address->b_enabled == true && @@ -234,8 +234,7 @@ static void * RunThread( vlc_object_t *p_this) { announce_SendSAPAnnounce( p_sap, p_session ); } - - msleep( SAP_IDLE ); + vlc_object_unlock( p_sap ); } return NULL; }