[pulseaudio-discuss] [PATCH] rtp-recv: Only free rtpoll if it actually exist

Javier Jardón jjardon at gnome.org
Wed Jan 15 07:56:37 PST 2014


From: Javier Jardón <javier.jardon at codethink.co.uk>

---
 src/modules/rtp/module-rtp-recv.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index fe9cf5d..bc47dd2 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -407,12 +407,14 @@ static void sink_input_attach(pa_sink_input *i) {
 /* Called from I/O thread context */
 static void sink_input_detach(pa_sink_input *i) {
     struct session *s;
+
     pa_sink_input_assert_ref(i);
     pa_assert_se(s = i->userdata);
 
-    pa_assert(s->rtpoll_item);
-    pa_rtpoll_item_free(s->rtpoll_item);
-    s->rtpoll_item = NULL;
+    if (s->rtpoll_item) {
+        pa_rtpoll_item_free(s->rtpoll_item);
+        s->rtpoll_item = NULL;
+    }
 }
 
 static int mcast_socket(const struct sockaddr* sa, socklen_t salen) {
-- 
1.8.1.4



More information about the pulseaudio-discuss mailing list