mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Fix a bug that could cause the cleanup() callback to be erroneously invoked without a prior call to setup() or init()
This commit is contained in:
parent
89c49a76cb
commit
f95f152439
@ -49,8 +49,6 @@ static void freePacketList(PLINKED_BLOCKING_QUEUE_ENTRY entry) {
|
|||||||
|
|
||||||
/* Tear down the audio stream once we're done with it */
|
/* Tear down the audio stream once we're done with it */
|
||||||
void destroyAudioStream(void) {
|
void destroyAudioStream(void) {
|
||||||
AudioCallbacks.cleanup();
|
|
||||||
|
|
||||||
freePacketList(LbqDestroyLinkedBlockingQueue(&packetQueue));
|
freePacketList(LbqDestroyLinkedBlockingQueue(&packetQueue));
|
||||||
RtpqCleanupQueue(&rtpReorderQueue);
|
RtpqCleanupQueue(&rtpReorderQueue);
|
||||||
}
|
}
|
||||||
@ -191,6 +189,8 @@ static void DecoderThreadProc(void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void stopAudioStream(void) {
|
void stopAudioStream(void) {
|
||||||
|
AudioCallbacks.cleanup();
|
||||||
|
|
||||||
PltInterruptThread(&udpPingThread);
|
PltInterruptThread(&udpPingThread);
|
||||||
PltInterruptThread(&receiveThread);
|
PltInterruptThread(&receiveThread);
|
||||||
PltInterruptThread(&decoderThread);
|
PltInterruptThread(&decoderThread);
|
||||||
|
@ -31,8 +31,6 @@ void initializeVideoStream(void) {
|
|||||||
|
|
||||||
/* Clean up the video stream */
|
/* Clean up the video stream */
|
||||||
void destroyVideoStream(void) {
|
void destroyVideoStream(void) {
|
||||||
VideoCallbacks.cleanup();
|
|
||||||
|
|
||||||
destroyVideoDepacketizer();
|
destroyVideoDepacketizer();
|
||||||
RtpqCleanupQueue(&rtpQueue);
|
RtpqCleanupQueue(&rtpQueue);
|
||||||
}
|
}
|
||||||
@ -150,6 +148,8 @@ int readFirstFrame(void) {
|
|||||||
|
|
||||||
/* Terminate the video stream */
|
/* Terminate the video stream */
|
||||||
void stopVideoStream(void) {
|
void stopVideoStream(void) {
|
||||||
|
VideoCallbacks.cleanup();
|
||||||
|
|
||||||
PltInterruptThread(&udpPingThread);
|
PltInterruptThread(&udpPingThread);
|
||||||
PltInterruptThread(&receiveThread);
|
PltInterruptThread(&receiveThread);
|
||||||
PltInterruptThread(&decoderThread);
|
PltInterruptThread(&decoderThread);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user