From 83bf2f141cf31c836b1ba5a6a8c6e49bbc686edf Mon Sep 17 00:00:00 2001 From: Carlos Duran Date: Tue, 4 Mar 2025 13:12:12 +0100 Subject: [PATCH] Send EOS to appsrc when stopping if block enabled --- gst/interpipe/gstinterpipesrc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/interpipe/gstinterpipesrc.c b/gst/interpipe/gstinterpipesrc.c index 9799d8c..622f2f3 100644 --- a/gst/interpipe/gstinterpipesrc.c +++ b/gst/interpipe/gstinterpipesrc.c @@ -416,12 +416,20 @@ gst_inter_pipe_src_stop (GstBaseSrc * base) { GstBaseSrcClass *basesrc_class; GstInterPipeSrc *src; + GstAppSrc *appsrc; GstInterPipeIListener *listener; + gboolean blocking; basesrc_class = GST_BASE_SRC_CLASS (gst_inter_pipe_src_parent_class); src = GST_INTER_PIPE_SRC (base); + appsrc = GST_APP_SRC (src); listener = GST_INTER_PIPE_ILISTENER (src); + g_object_get(G_OBJECT(appsrc), "block", &blocking, NULL); + if (blocking) { + gst_app_src_end_of_stream(GST_APP_SRC(appsrc)); + } + if (src->listening) { GST_INFO_OBJECT (src, "Removing listener from node %s", src->listen_to); gst_inter_pipe_leave_node (listener);