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.
This commit is contained in:
Sebastian Dröge 2016-08-18 15:28:33 +03:00
parent e786f737ae
commit 0d06f4bc7c

View file

@ -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);
}
}