Add missing callbacks to Stop and Release for A/V

This commit is contained in:
Cameron Gutman 2014-02-02 05:54:41 -05:00
parent b775e6b8fb
commit 8ad3145638
2 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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);