Add rtp init and terminate, mirror all globals in the conn data structure

This commit is contained in:
Mike Brady
2017-03-16 13:19:38 +00:00
parent 728d3d4956
commit e4d5570eee
5 changed files with 82 additions and 26 deletions
+2 -2
View File
@@ -1292,8 +1292,6 @@ static void *player_thread_func(void *arg) {
// must be after decoder init
init_buffer(conn);
debug(1, "Output frame bytes is %d.", conn->output_bytes_per_frame);
if (conn->stream.encrypted) {
#ifdef HAVE_LIBMBEDTLS
memset(&conn->dctx, 0, sizeof(mbedtls_aes_context));
@@ -1336,6 +1334,8 @@ static void *player_thread_func(void *arg) {
break;
}
debug(1, "Output frame bytes is %d.", conn->output_bytes_per_frame);
// create and start the timing, control and audio receiver threads
pthread_t rtp_audio_thread, rtp_control_thread, rtp_timing_thread;
pthread_create(&rtp_audio_thread, NULL, &rtp_audio_receiver, (void*) conn);