mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
fix double-lock
This commit is contained in:
parent
d3cdb2e11b
commit
f2b5952159
@ -653,7 +653,6 @@ st_thread_main(void *self) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void FfmpegVideoCursor::
|
void FfmpegVideoCursor::
|
||||||
thread_main() {
|
thread_main() {
|
||||||
MutexHolder holder(_lock);
|
|
||||||
if (ffmpeg_cat.is_spam()) {
|
if (ffmpeg_cat.is_spam()) {
|
||||||
ffmpeg_cat.spam()
|
ffmpeg_cat.spam()
|
||||||
<< "ffmpeg thread for " << _filename.get_basename() << " starting.\n";
|
<< "ffmpeg thread for " << _filename.get_basename() << " starting.\n";
|
||||||
@ -669,6 +668,7 @@ thread_main() {
|
|||||||
|
|
||||||
// Now repeatedly wait for something interesting to do, until we're told
|
// Now repeatedly wait for something interesting to do, until we're told
|
||||||
// to shut down.
|
// to shut down.
|
||||||
|
MutexHolder holder(_lock);
|
||||||
while (_thread_status != TS_shutdown) {
|
while (_thread_status != TS_shutdown) {
|
||||||
nassertv(_thread_status != TS_stopped);
|
nassertv(_thread_status != TS_stopped);
|
||||||
_action_cvar.wait();
|
_action_cvar.wait();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user