[vlc-devel] commit: threads: Make sure we don' t re-create a thread if the object has already one. (Pierre d'Herbemont )

git version control git at videolan.org
Thu Jul 31 22:56:44 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Thu Jul 31 22:59:23 2008 +0200| [848489c3863b1b7ddbe542aa3e746063722b9280]

threads: Make sure we don't re-create a thread if the object has already one.

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

 src/misc/threads.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/misc/threads.c b/src/misc/threads.c
index 266584e..9cac384 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -501,6 +501,9 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
 
     vlc_object_lock( p_this );
 
+    /* Make sure we don't re-create a thread if the object has already one */
+    assert( !p_priv->b_thread );
+
 #if defined( LIBVLC_USE_PTHREAD )
     pthread_attr_t attr;
     pthread_attr_init (&attr);




More information about the vlc-devel mailing list