slitmuxsrc: Properly stop the loop if not part reader is present

Previously this would end up in a refcounting loop of hell.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/578>
This commit is contained in:
Edward Hervey 2020-05-05 15:19:49 +02:00 committed by Edward Hervey
parent 6a38961561
commit cfb9a5d53a

View file

@ -751,7 +751,11 @@ gst_splitmux_pad_loop (GstPad * pad)
GST_OBJECT_LOCK (splitpad);
if (splitpad->part_pad == NULL) {
GST_DEBUG_OBJECT (splitmux,
"Pausing task because part reader is not present");
GST_OBJECT_UNLOCK (splitpad);
gst_pad_pause_task (pad);
gst_object_unref (splitmux);
return;
}
part_pad = gst_object_ref (splitpad->part_pad);