summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2020-07-28 12:24:07 +0300
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-07-29 13:20:28 +0000
commitfc9a612e2cb6a9d66319d316edce71bb058022cd (patch)
tree36ca83df20d3179bf04a99fa7c9d069e35978444 /gst
parent914161f90209c6b5d504c8c7665f2d2051c25ea8 (diff)
downloadgstreamer-plugins-bad-fc9a612e2cb6a9d66319d316edce71bb058022cd.tar.gz
ristsrc: drop stream-start & eos messages posted from the internal udp sink(s)
See #1368 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1472>
Diffstat (limited to 'gst')
-rw-r--r--gst/rist/gstristsrc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gst/rist/gstristsrc.c b/gst/rist/gstristsrc.c
index 0545faf0d..5e194fcea 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 <nicolas.dufresne@collabora.com");
gst_element_class_add_static_pad_template (element_class, &src_templ);
+ bin_class->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;