[ekiga] Fix crash with DEBUG=1 on mutex destruction
- From: Eugen Dedu <ededu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Fix crash with DEBUG=1 on mutex destruction
- Date: Sat, 9 Mar 2013 20:44:29 +0000 (UTC)
commit c98e78a5daf8182eadebe1c3fb3a2c9a7f4b473c
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date: Sat Mar 9 21:43:24 2013 +0100
Fix crash with DEBUG=1 on mutex destruction
Completes commit a5151ef.
.../x-videooutput/videooutput-manager-x.cpp | 2 +-
lib/engine/videoinput/videoinput-core.cpp | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
b/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
index d2009ed..c00faff 100644
--- a/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
+++ b/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
@@ -77,7 +77,7 @@ void GMVideoOutputManager_x::quit ()
{
end_thread = true;
run_thread.Signal();
- thread_ended.Wait();
+ PWaitAndSignal m(thread_ended);
if (lDisplay)
XCloseDisplay (lDisplay);
diff --git a/lib/engine/videoinput/videoinput-core.cpp b/lib/engine/videoinput/videoinput-core.cpp
index 4905c96..56b27fd 100644
--- a/lib/engine/videoinput/videoinput-core.cpp
+++ b/lib/engine/videoinput/videoinput-core.cpp
@@ -56,7 +56,7 @@ VideoInputCore::VideoPreviewManager::VideoPreviewManager (VideoInputCore& _video
pause_thread = true;
end_thread = false;
frame = NULL;
- // Since windows does not like to restart a thread that
+ // Since windows does not like to restart a thread that
// was never started, we do so here
this->Resume ();
thread_paused.Wait();
@@ -93,7 +93,7 @@ void VideoInputCore::VideoPreviewManager::stop ()
if (frame) {
free (frame);
frame = NULL;
- }
+ }
videooutput_core->stop();
}
@@ -101,12 +101,11 @@ void VideoInputCore::VideoPreviewManager::Main ()
{
PWaitAndSignal m(thread_ended);
-
while (!end_thread) {
thread_paused.Signal ();
run_thread.Wait ();
-
+
while (!pause_thread) {
if (frame) {
videoinput_core.get_frame_data(frame);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]