Thread: [Mplayerplug-in-devel] [patch] playlist_cond_mutex is not unlocked.
Brought to you by:
kdekorte
From: Matsumoto Y. <mat...@ho...> - 2006-01-20 11:16:36
|
Hi, It seems that 'playlist_cond_mutex' is not unlocked. For example, 1. play playlist from mms 2. call Stop() 3. call Play() playPlaylist() call pthread_mutex_lock() at the first. Then browser was locked. playPlaylist() don't call pthread_exit(), thus it should call pthread_mutex_unlock() itself. I tried following patch. It seems OK to me. Please check and include. Thanks. - Yasuhiro Matsumoto Index: Source/plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.203 diff -c -r1.203 plugin-threads.cpp *** Source/plugin-threads.cpp 18 Jan 2006 02:05:55 -0000 1.203 --- Source/plugin-threads.cpp 20 Jan 2006 11:07:14 -0000 *************** *** 1967,1972 **** --- 1967,1973 ---- local_td->argv[argc++] = NULL; } pthread_mutex_unlock(&(local_td->instance->control_mutex)); + pthread_mutex_unlock(&(local_td->instance->playlist_cond_mutex)); // since thread is dead, reset thread state variables. local_td->instance->threadsetup = 0; |
From: Kevin D. <kde...@ya...> - 2006-01-20 14:36:20
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Matsumoto Yasuhiro wrote: > Hi, > > It seems that 'playlist_cond_mutex' is not unlocked. > > For example, > 1. play playlist from mms > 2. call Stop() > 3. call Play() > > playPlaylist() call pthread_mutex_lock() at the first. > Then browser was locked. > playPlaylist() don't call pthread_exit(), > thus it should call pthread_mutex_unlock() itself. > > I tried following patch. > It seems OK to me. > Please check and include. > > Thanks. > - Yasuhiro Matsumoto > > Index: Source/plugin-threads.cpp > =================================================================== > RCS file: > /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v > retrieving revision 1.203 > diff -c -r1.203 plugin-threads.cpp > *** Source/plugin-threads.cpp 18 Jan 2006 02:05:55 -0000 1.203 > --- Source/plugin-threads.cpp 20 Jan 2006 11:07:14 -0000 > *************** > *** 1967,1972 **** > --- 1967,1973 ---- > local_td->argv[argc++] = NULL; > } > pthread_mutex_unlock(&(local_td->instance->control_mutex)); > + pthread_mutex_unlock(&(local_td->instance->playlist_cond_mutex)); > > // since thread is dead, reset thread state variables. > local_td->instance->threadsetup = 0; > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Mplayerplug-in-devel mailing list > Mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mplayerplug-in-devel > Yasuhiro, Does this patch work the same? If so I prefer it. Index: plugin-threads.cpp =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v retrieving revision 1.203 diff -u -r1.203 plugin-threads.cpp - --- plugin-threads.cpp 18 Jan 2006 02:05:55 -0000 1.203 +++ plugin-threads.cpp 20 Jan 2006 14:34:51 -0000 @@ -1481,6 +1481,7 @@ } } else { local_td->instance->threadsignaled = 1; + pthread_mutex_unlock(&(local_td->instance->playlist_cond_mutex)); } pthread_cleanup_pop(0); - -- Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=7574690260641978351 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFD0PVLaR60qN0tF+8RAlGEAKC6Gksc5XdSLja9UbxawrJ/MxR3HwCfaSmC r3Qf+C4OJ2p16Xus2kVa+zc= =jK1S -----END PGP SIGNATURE----- |
From: Kevin D. <kde...@ya...> - 2006-01-20 16:40:02
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kevin DeKorte wrote: > Matsumoto Yasuhiro wrote: >>> Hi, >>> >>> It seems that 'playlist_cond_mutex' is not unlocked. >>> >>> For example, >>> 1. play playlist from mms >>> 2. call Stop() >>> 3. call Play() >>> >>> playPlaylist() call pthread_mutex_lock() at the first. >>> Then browser was locked. >>> playPlaylist() don't call pthread_exit(), >>> thus it should call pthread_mutex_unlock() itself. >>> >>> I tried following patch. >>> It seems OK to me. >>> Please check and include. >>> >>> Thanks. >>> - Yasuhiro Matsumoto >>> >>> Index: Source/plugin-threads.cpp >>> =================================================================== >>> RCS file: >>> /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v >>> retrieving revision 1.203 >>> diff -c -r1.203 plugin-threads.cpp >>> *** Source/plugin-threads.cpp 18 Jan 2006 02:05:55 -0000 1.203 >>> --- Source/plugin-threads.cpp 20 Jan 2006 11:07:14 -0000 >>> *************** >>> *** 1967,1972 **** >>> --- 1967,1973 ---- >>> local_td->argv[argc++] = NULL; >>> } >>> pthread_mutex_unlock(&(local_td->instance->control_mutex)); >>> + pthread_mutex_unlock(&(local_td->instance->playlist_cond_mutex)); >>> >>> // since thread is dead, reset thread state variables. >>> local_td->instance->threadsetup = 0; >>> > Yasuhiro, > > Does this patch work the same? If so I prefer it. > > Index: plugin-threads.cpp > =================================================================== > RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/Source/plugin-threads.cpp,v > retrieving revision 1.203 > diff -u -r1.203 plugin-threads.cpp > --- plugin-threads.cpp 18 Jan 2006 02:05:55 -0000 1.203 > +++ plugin-threads.cpp 20 Jan 2006 14:34:51 -0000 > @@ -1481,6 +1481,7 @@ > } > } else { > local_td->instance->threadsignaled = 1; > + pthread_mutex_unlock(&(local_td->instance->playlist_cond_mutex)); > } > > pthread_cleanup_pop(0); > > > -- > Get my public GnuPG key from > http://keyserver.veridis.com:11371/export?id=7574690260641978351 Nevermind, I took your patch and found something else that needed to be done... Kevin - -- Get my public GnuPG key from http://keyserver.veridis.com:11371/export?id=7574690260641978351 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFD0RJiaR60qN0tF+8RAl08AKDOc19kzv4vGDTtlwCbPx8xBziargCfb5ke Y4ULTSB6TKGULOkaFUvz+5E= =3rw0 -----END PGP SIGNATURE----- |