From 88d8c8ede77915f980f38d07728233bfb19a328b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 21 Oct 2014 01:50:46 -0400 Subject: [PATCH] Fix issues stopping and restarting streams --- limelight-common/Connection.c | 4 +++- limelight-common/InputStream.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/limelight-common/Connection.c b/limelight-common/Connection.c index ba76343..099811c 100644 --- a/limelight-common/Connection.c +++ b/limelight-common/Connection.c @@ -5,7 +5,7 @@ static int stage = STAGE_NONE; static CONNECTION_LISTENER_CALLBACKS listenerCallbacks; static CONNECTION_LISTENER_CALLBACKS originalCallbacks; -static int alreadyTerminated = 0; +static int alreadyTerminated; static const char* stageNames[STAGE_MAX] = { "none", @@ -144,6 +144,8 @@ int LiStartConnection(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfig, PCONN listenerCallbacks.connectionTerminated = ClConnectionTerminated; listenerCallbacks.displayMessage = ClDisplayMessage; listenerCallbacks.displayTransientMessage = ClDisplayTransientMessage; + + alreadyTerminated = 0; Limelog("Initializing platform..."); listenerCallbacks.stageStarting(STAGE_PLATFORM_INIT); diff --git a/limelight-common/InputStream.c b/limelight-common/InputStream.c index 0cedf09..49517ee 100644 --- a/limelight-common/InputStream.c +++ b/limelight-common/InputStream.c @@ -70,7 +70,8 @@ void destroyInputStream(void) { if (oaesContext != NULL) { - oaes_free(oaesContext); + // FIXME: This crashes trying to free ctx->key + // oaes_free(oaesContext); oaesContext = NULL; }