mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-29 09:14:13 +00:00
Consolidate PltCloseThread() and PltJoinThread()
This commit is contained in:
1 parent
9545dd7603
commit
9686f6942f
6 files changed
+7
-64
No files matched your search
@@ -302,12 +302,6 @@ void stopVideoStream(void) {
|
||||
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||
PltJoinThread(&decoderThread);
|
||||
}
|
||||
|
||||
PltCloseThread(&udpPingThread);
|
||||
PltCloseThread(&receiveThread);
|
||||
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||
PltCloseThread(&decoderThread);
|
||||
}
|
||||
|
||||
if (firstFrameSocket != INVALID_SOCKET) {
|
||||
closeSocket(firstFrameSocket);
|
||||
@@ -360,7 +354,6 @@ int startVideoStream(void* rendererContext, int drFlags) {
|
||||
VideoCallbacks.stop();
|
||||
PltInterruptThread(&receiveThread);
|
||||
PltJoinThread(&receiveThread);
|
||||
PltCloseThread(&receiveThread);
|
||||
closeSocket(rtpSocket);
|
||||
VideoCallbacks.cleanup();
|
||||
return err;
|
||||
@@ -382,10 +375,6 @@ int startVideoStream(void* rendererContext, int drFlags) {
|
||||
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||
PltJoinThread(&decoderThread);
|
||||
}
|
||||
PltCloseThread(&receiveThread);
|
||||
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||
PltCloseThread(&decoderThread);
|
||||
}
|
||||
closeSocket(rtpSocket);
|
||||
VideoCallbacks.cleanup();
|
||||
return LastSocketError();
|
||||
@@ -406,10 +395,6 @@ int startVideoStream(void* rendererContext, int drFlags) {
|
||||
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||
PltJoinThread(&decoderThread);
|
||||
}
|
||||
PltCloseThread(&receiveThread);
|
||||
if ((VideoCallbacks.capabilities & (CAPABILITY_DIRECT_SUBMIT | CAPABILITY_PULL_RENDERER)) == 0) {
|
||||
PltCloseThread(&decoderThread);
|
||||
}
|
||||
closeSocket(rtpSocket);
|
||||
if (firstFrameSocket != INVALID_SOCKET) {
|
||||
closeSocket(firstFrameSocket);
|
||||
|
||||
Reference in new issue
Block a user