From a68d867cb31acb7b440bab8d674f108e32e31f38 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Mon, 9 Jun 2014 21:13:22 +0100 Subject: [PATCH] mpegts: fix possible recursion, causing strange crashes I'm not entirely sure what has changed that has made this a problem where it apparently wasn't before. That being said, its not nice and would previously have said it might cause undesirable side-effects. I would have been right! --- src/input/mpegts/mpegts_mux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/input/mpegts/mpegts_mux.c b/src/input/mpegts/mpegts_mux.c index 18d7e034c..d0570068f 100644 --- a/src/input/mpegts/mpegts_mux.c +++ b/src/input/mpegts/mpegts_mux.c @@ -576,6 +576,10 @@ mpegts_mux_stop ( mpegts_mux_t *mm, int force ) if (!force && mpegts_mux_has_subscribers(mm)) return; + /* Stop possible recursion */ + if (!mmi) return; + mm->mm_active = NULL; + mm->mm_display_name(mm, buf, sizeof(buf)); tvhdebug("mpegts", "%s - stopping mux", buf); -- 2.47.2