Added graceful renderer and audio thread destruction, fixes #47

This commit is contained in:
Jarcode
2018-09-09 07:54:51 -07:00
parent d4b333e48c
commit 11a6137370
5 changed files with 57 additions and 4 deletions

View File

@@ -292,5 +292,12 @@ int main(int argc, char** argv) {
}
}
audio.terminate = 1;
int return_status;
if ((return_status = pthread_join(thread, NULL))) {
fprintf(stderr, "Failed to join with audio thread: %s\n", strerror(return_status));
}
free(audio.source);
rd_destroy(r);
}