From fc9a612e2cb6a9d66319d316edce71bb058022cd Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Tue, 28 Jul 2020 12:24:07 +0300 Subject: [PATCH] ristsrc: drop stream-start & eos messages posted from the internal udp sink(s) See #1368 Part-of: --- gst/rist/gstristsrc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gst/rist/gstristsrc.c b/gst/rist/gstristsrc.c index 0545faf0dc..5e194fcea6 100644 --- a/gst/rist/gstristsrc.c +++ b/gst/rist/gstristsrc.c @@ -474,6 +474,22 @@ missing_plugin: } } +static void +gst_rist_src_handle_message (GstBin * bin, GstMessage * message) +{ + switch (GST_MESSAGE_TYPE (message)) { + case GST_MESSAGE_STREAM_START: + case GST_MESSAGE_EOS: + /* drop stream-start & eos from our internal udp sink(s); + https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1368 */ + gst_message_unref (message); + break; + default: + GST_BIN_CLASS (gst_rist_src_parent_class)->handle_message (bin, message); + break; + } +} + static GstPadProbeReturn gst_rist_src_on_recv_rtcp (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) @@ -1236,6 +1252,7 @@ gst_rist_src_finalize (GObject * object) static void gst_rist_src_class_init (GstRistSrcClass * klass) { + GstBinClass *bin_class = (GstBinClass *) klass; GstElementClass *element_class = (GstElementClass *) klass; GObjectClass *object_class = (GObjectClass *) klass; @@ -1245,6 +1262,8 @@ gst_rist_src_class_init (GstRistSrcClass * klass) "Nicolas Dufresne handle_message = gst_rist_src_handle_message; + element_class->change_state = gst_rist_src_change_state; object_class->get_property = gst_rist_src_get_property;