summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2020-10-29 02:36:35 +1100
committerTim-Philipp Müller <tim@centricular.com>2020-10-31 11:40:08 +0000
commit709d27b510388e7203bdc626588e60d5a0472704 (patch)
tree0acd3b125743920384c73082c1887fab605f5cf1
parentf8d6a68c69928ba83ff9cb2f0a39c61328f7cf0b (diff)
downloadgstreamer-plugins-good-709d27b510388e7203bdc626588e60d5a0472704.tar.gz
splitmuxsink: Forward EOS messages from async fragments.
Re-enable forwarding EOS messages from fragments that are completing asynchronously, so that splitmuxsink itself won't go EOS until they are complete. This was disabled to work around a bug in core that is fixed in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/683 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/799>
-rw-r--r--gst/multifile/gstsplitmuxsink.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gst/multifile/gstsplitmuxsink.c b/gst/multifile/gstsplitmuxsink.c
index 2154eade8..d4161c5f6 100644
--- a/gst/multifile/gstsplitmuxsink.c
+++ b/gst/multifile/gstsplitmuxsink.c
@@ -1178,16 +1178,15 @@ eos_context_async (MqStreamCtx * ctx, GstSplitMuxSink * splitmux)
helper->pad = sinkpad; /* Takes the reference */
ctx->out_eos_async_done = TRUE;
- /* HACK: Here, we explicitly unset the SINK flag on the target sink element
- * that's about to be asynchronously disposed, so that it no longer
- * participates in GstBin EOS logic. This fixes a race where if
- * splitmuxsink really reaches EOS before an asynchronous background
- * element has finished, then the bin won't actually send EOS to the
- * pipeline. Even after finishing and removing the old element, the
- * bin doesn't re-check EOS status on removing a SINK element. This
- * should be fixed in core, making this hack unnecessary. */
- GST_OBJECT_FLAG_UNSET (splitmux->active_sink, GST_ELEMENT_FLAG_SINK);
+ /* There used to be a bug here, where we had to explicitly remove
+ * the SINK flag so that GstBin would ignore it for EOS purposes.
+ * That fixed a race where if splitmuxsink really reaches EOS
+ * before an asynchronous background element has finished, then
+ * the bin wouldn't actually send EOS to the pipeline. Even after
+ * finishing and removing the old element, the bin didn't re-check
+ * EOS status on removing a SINK element. That bug was fixed
+ * in core. */
GST_DEBUG_OBJECT (splitmux, "scheduled EOS to pad %" GST_PTR_FORMAT " ctx %p",
sinkpad, ctx);