splitmuxsrc: don't queue data on unlinked pads

Once a pad has returned NOT_LINKED, the part reader shouldn't let its
corresponding data queue run full and eventually (after 20 seconds)
stall playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3169>
This commit is contained in:
Mathieu Duponchelle 2022-10-08 01:03:13 +02:00 committed by GStreamer Marge Bot
parent 604e6a1336
commit 2ae4abcf99

View file

@ -231,6 +231,12 @@ splitmux_part_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
return GST_FLOW_FLUSHING; return GST_FLOW_FLUSHING;
} }
if (GST_PAD_LAST_FLOW_RETURN (part_pad->target) == GST_FLOW_NOT_LINKED) {
SPLITMUX_PART_UNLOCK (reader);
gst_buffer_unref (buf);
return GST_FLOW_NOT_LINKED;
}
/* Adjust buffer timestamps */ /* Adjust buffer timestamps */
offset = reader->start_offset + part_pad->segment.base; offset = reader->start_offset + part_pad->segment.base;
offset -= part_pad->initial_ts_offset; offset -= part_pad->initial_ts_offset;