From c2491a3e9f55a355aed7930d5f00a7a03a504694 Mon Sep 17 00:00:00 2001 From: fduncanh Date: Wed, 4 May 2022 02:56:42 -0400 Subject: [PATCH] destroy raop_ntp after rtp and rtp_mirror --- lib/raop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/raop.c b/lib/raop.c index 6abd1b8..3b986f9 100644 --- a/lib/raop.c +++ b/lib/raop.c @@ -365,9 +365,6 @@ conn_destroy(void *ptr) { conn->raop->callbacks.conn_destroy(conn->raop->callbacks.cls); } - if (conn->raop_ntp) { - raop_ntp_destroy(conn->raop_ntp); - } if (conn->raop_rtp) { /* This is done in case TEARDOWN was not called */ raop_rtp_destroy(conn->raop_rtp); @@ -376,7 +373,10 @@ conn_destroy(void *ptr) { /* This is done in case TEARDOWN was not called */ raop_rtp_mirror_destroy(conn->raop_rtp_mirror); } - + if (conn->raop_ntp) { + raop_ntp_destroy(conn->raop_ntp); + } + if (conn->raop->callbacks.video_flush) { conn->raop->callbacks.video_flush(conn->raop->callbacks.cls); }