possible fix for Opus crash on reconnect

This commit is contained in:
rafael@riseup.net 2013-05-19 17:14:32 +00:00
parent 0a8d66a9ba
commit c1a801eaa5
1 changed files with 7 additions and 1 deletions

View File

@ -548,7 +548,13 @@ OpusLibEncoder :: close ( void ) throw ( Exception )
opusEncoder = NULL;
encoderOpen = false;
delete[] internalBuffer;
if (internalBuffer) {
delete[] internalBuffer;
internalBuffer = NULL;
}
else {
fprintf(stderr, "Opus internalBuffer is NULL!\n");
}
getSink()->close();
}