From 2ae4abcf99925a9ca9d59712698a4fecf95a8af6 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Sat, 8 Oct 2022 01:03:13 +0200 Subject: [PATCH] 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: --- .../gst-plugins-good/gst/multifile/gstsplitmuxpartreader.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/multifile/gstsplitmuxpartreader.c b/subprojects/gst-plugins-good/gst/multifile/gstsplitmuxpartreader.c index ef2d504e04..5b4e2b134b 100644 --- a/subprojects/gst-plugins-good/gst/multifile/gstsplitmuxpartreader.c +++ b/subprojects/gst-plugins-good/gst/multifile/gstsplitmuxpartreader.c @@ -231,6 +231,12 @@ splitmux_part_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) 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 */ offset = reader->start_offset + part_pad->segment.base; offset -= part_pad->initial_ts_offset;