Improved RfbPlayer implementation.
The reading thread must resume playback itself when destoying.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@161 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx
index 60c1c3b..ad0607f 100644
--- a/rfbplayer/rfbplayer.cxx
+++ b/rfbplayer/rfbplayer.cxx
@@ -93,9 +93,6 @@
SetWindowLong(hwnd, GWL_USERDATA, (long)((CREATESTRUCT*)lParam)->lpCreateParams);
else if (msg == WM_DESTROY) {
RfbPlayer* _this = (RfbPlayer*) GetWindowLong(hwnd, GWL_USERDATA);
-
- // Resume playback (It's need to quit from FbsInputStream::waitWhilePaused())
- _this->setPaused(false);
SetWindowLong(hwnd, GWL_USERDATA, 0);
}
RfbPlayer* _this = (RfbPlayer*) GetWindowLong(hwnd, GWL_USERDATA);
@@ -362,7 +359,6 @@
}
break;
case ID_EXIT:
- if (is) is->resumePlayback();
PostQuitMessage(0);
break;
case ID_HELP_COMMANDLINESWITCHES:
@@ -906,8 +902,8 @@
// Close the previous reading thread
if (rfbReader) {
- is->resumePlayback();
delete rfbReader->join();
+ rfbReader = 0;
}
blankBuffer();
newSession(fileName);