From 8ad31456388a029b807feb62b1cdbd62dc9ce25c Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 2 Feb 2014 05:54:41 -0500 Subject: [PATCH] Add missing callbacks to Stop and Release for A/V --- limelight-common/AudioStream.c | 4 ++++ limelight-common/VideoStream.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/limelight-common/AudioStream.c b/limelight-common/AudioStream.c index 119b977..a70f0cc 100644 --- a/limelight-common/AudioStream.c +++ b/limelight-common/AudioStream.c @@ -26,6 +26,8 @@ void initializeAudioStream(IP_ADDRESS host, PAUDIO_RENDERER_CALLBACKS arCallback void destroyAudioStream(void) { PLINKED_BLOCKING_QUEUE_ENTRY entry, nextEntry; + callbacks.release(); + entry = LbqDestroyLinkedBlockingQueue(&packetQueue); while (entry != NULL) { @@ -133,6 +135,8 @@ static void DecoderThreadProc(void* context) { } void stopAudioStream(void) { + callbacks.stop(); + PltInterruptThread(&udpPingThread); PltInterruptThread(&receiveThread); PltInterruptThread(&decoderThread); diff --git a/limelight-common/VideoStream.c b/limelight-common/VideoStream.c index a6ff661..afb9312 100644 --- a/limelight-common/VideoStream.c +++ b/limelight-common/VideoStream.c @@ -35,6 +35,8 @@ void initializeVideoStream(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfig, void destroyVideoStream(void) { PLINKED_BLOCKING_QUEUE_ENTRY entry, nextEntry; + callbacks.release(); + destroyVideoDepacketizer(); entry = LbqDestroyLinkedBlockingQueue(&packetQueue); @@ -167,6 +169,8 @@ int readFirstFrame(void) { } void stopVideoStream(void) { + callbacks.stop(); + PltInterruptThread(&udpPingThread); PltInterruptThread(&receiveThread); PltInterruptThread(&depacketizerThread);