Thread: [Mplayerplug-in-cvs] mplayerplug-in/Source plugin-threads.cpp,1.146,1.147 plugin.h,1.64,1.65
Brought to you by:
kdekorte
From: Kevin D. <kde...@us...> - 2005-06-15 22:16:13
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3419/Source Modified Files: plugin-threads.cpp plugin.h Log Message: couple of state adjustments Index: plugin.h =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin.h,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** plugin.h 13 Jun 2005 16:05:49 -0000 1.64 --- plugin.h 15 Jun 2005 22:16:04 -0000 1.65 *************** *** 143,149 **** int noredraw; int hrefrequested; ! int threadsetup; ! int threadlaunched; ! int threadsignaled; int cancelled; int autostart; --- 143,149 ---- int noredraw; int hrefrequested; ! int threadsetup; // has the child thread been setup but not signalled ! int threadlaunched; // only allow 1 child thread per instance ! int threadsignaled; // keep track if the thread has been told to start int cancelled; int autostart; Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -d -r1.146 -r1.147 *** plugin-threads.cpp 15 Jun 2005 20:32:03 -0000 1.146 --- plugin-threads.cpp 15 Jun 2005 22:16:04 -0000 1.147 *************** *** 1632,1635 **** --- 1632,1636 ---- } + // free all the data (command line parameters) that is used to start mplayer pthread_mutex_lock(&(local_td->instance->control_mutex)); local_td->instance->js_state = JS_STATE_UNDEFINED; *************** *** 1642,1645 **** --- 1643,1651 ---- pthread_mutex_unlock(&(local_td->instance->control_mutex)); + // since thread is dead, reset thread state variables. + local_td->instance->threadsetup = 0; + local_td->instance->threadlaunched = 0; + local_td->instance->threadsignaled = 0; + //once we get here, the thread is only allowed to access stack // variables and then exit (since another player thread may have *************** *** 1650,1654 **** } - pthread_exit(0); --- 1656,1659 ---- |