From 0d06f4bc7c6af1935cc595b93ef3f7abf1b6f4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 18 Aug 2016 15:28:33 +0300 Subject: [PATCH] mplex: Don't start task (yet/again) on pad release if we're in READY or NULL Fixes spurious segfault in unit test, where the task was started again during shutdown when all pads were removed... and was then still running while the element was finalized. --- ext/mplex/gstmplex.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc index 4089485594..7f7b4ecae7 100644 --- a/ext/mplex/gstmplex.cc +++ b/ext/mplex/gstmplex.cc @@ -676,7 +676,8 @@ gst_mplex_release_pad (GstElement * element, GstPad * pad) g_free (padname); /* may now be up to us to get things going */ - gst_mplex_start_task (mplex); + if (GST_STATE (element) > GST_STATE_READY) + gst_mplex_start_task (mplex); GST_MPLEX_MUTEX_UNLOCK (mplex); } }