[vlc-devel] commit: SAP out: do not access b_die directly ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Aug 27 22:57:34 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Aug 16 19:30:46 2008 +0300| [9522f3741d92bec61e97451cb1bb6a2cd51c0e85] | committer: Rémi Denis-Courmont 

SAP out: do not access b_die directly

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9522f3741d92bec61e97451cb1bb6a2cd51c0e85
---

 src/stream_output/sap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/stream_output/sap.c b/src/stream_output/sap.c
index 36e27cd..cc6f887 100644
--- a/src/stream_output/sap.c
+++ b/src/stream_output/sap.c
@@ -192,10 +192,9 @@ static void * RunThread( vlc_object_t *p_this)
 {
     sap_handler_t *p_sap = (sap_handler_t*)p_this;
     sap_session_t *p_session;
-    int canc = vlc_savecancel ();
     /* TODO: Use poll() instead of msleep()). */
 
-    while( !p_sap->b_die )
+    for (;;)
     {
         int i;
 
@@ -234,11 +233,12 @@ static void * RunThread( vlc_object_t *p_this)
         if( p_session->p_address->b_enabled == true &&
             p_session->p_address->b_ready == true )
         {
+            int canc = vlc_savecancel ();
             announce_SendSAPAnnounce( p_sap, p_session );
+            vlc_restorecancel (canc);
         }
         vlc_object_unlock( p_sap );
     }
-    vlc_restorecancel (canc);
     return NULL;
 }
 




More information about the vlc-devel mailing list