/* If we are running on a thread, wait until it ends */
if( p_priv->b_thread )
+ {
+ msg_Warn (p_this->p_libvlc, /* do NOT use a dead object for logging! */
+ "object %d destroyed while thread alive (VLC might crash)",
+ p_this->i_object_id);
vlc_thread_join( p_this );
+ }
/* Call the custom "subclass" destructor */
if( p_priv->pf_destructor )
/* Make sure we do return if we are calling vlc_thread_join()
* from the joined thread */
if (pthread_equal (pthread_self (), p_priv->thread_id))
+ {
+ msg_Warn (p_this, "joining the active thread (VLC might crash)");
i_ret = pthread_detach (p_priv->thread_id);
+ }
else
i_ret = pthread_join (p_priv->thread_id, NULL);