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/3145>
This commit is contained in:
Mathieu Duponchelle 2022-10-08 01:03:13 +02:00 committed by GStreamer Marge Bot
parent bd5a4d321b
commit cddb0e951f

View file

@ -232,6 +232,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;