[vlc-devel] commit: mms: Fix uninitialized vlc_cond in mms KeepAlive thread ( Derk-Jan Hartman )

git version control git at videolan.org
Tue Sep 23 02:37:29 CEST 2008


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Tue Sep 23 02:39:41 2008 +0200| [33ad65cc49f5ea9d42c3c627f195a9dc66e445ee] | committer: Derk-Jan Hartman 

mms: Fix uninitialized vlc_cond in mms KeepAlive thread

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

 modules/access/mms/mmstu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index 99f4978..d7f8586 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -207,10 +207,12 @@ int  MMSTUOpen( access_t *p_access )
     p_sys->p_keepalive = malloc( sizeof( mmstu_keepalive_t ) );
     p_sys->p_keepalive->p_access = p_access;
     vlc_mutex_init( &p_sys->p_keepalive->lock );
+    vlc_cond_init( &p_sys->p_keepalive->wait );
     p_sys->p_keepalive->b_paused = false;
     if( vlc_clone( &p_sys->p_keepalive->handle, KeepAliveThread,
                    p_sys->p_keepalive, VLC_THREAD_PRIORITY_LOW ) )
     {
+        vlc_cond_destroy( &p_sys->p_keepalive->wait );
         vlc_mutex_destroy( &p_sys->p_keepalive->lock );
         free( p_sys->p_keepalive );
         p_sys->p_keepalive = NULL;
@@ -230,6 +232,7 @@ void MMSTUClose( access_t *p_access )
     {
         vlc_cancel( p_sys->p_keepalive->handle );
         vlc_join( p_sys->p_keepalive->handle, NULL );
+        vlc_cond_destroy( &p_sys->p_keepalive->wait );
         vlc_mutex_destroy( &p_sys->p_keepalive->lock );
         free( p_sys->p_keepalive );
     }




More information about the vlc-devel mailing list