From: Adam Sutton Date: Mon, 9 Jun 2014 20:13:22 +0000 (+0100) Subject: mpegts: fix possible recursion, causing strange crashes X-Git-Tag: v4.1~1985 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a68d867cb31acb7b440bab8d674f108e32e31f38;p=thirdparty%2Ftvheadend.git 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! --- 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);