--- /tmp/test_git/gst-plugins-bad/gst/mpegtsdemux/mpegtsbase.c.orig
+++ /tmp/test_git/gst-plugins-bad/gst/mpegtsdemux/mpegtsbase.c
@@ -40,6 +40,7 @@
 #include <gst/gst-i18n-plugin.h>
 #include "mpegtsbase.h"
 #include "gstmpegdesc.h"
+#include <gst/mpegts/mpegts.h>
 
 /* latency in mseconds */
 #define TS_LATENCY 700
@@ -84,6 +85,7 @@
     GstBuffer * buf);
 static gboolean mpegts_base_sink_event (GstPad * pad, GstObject * parent,
     GstEvent * event);
+static gboolean mpegts_base_send_event (GstElement *element, GstEvent *event);
 static GstStateChangeReturn mpegts_base_change_state (GstElement * element,
     GstStateChange transition);
 static gboolean mpegts_base_get_tags_from_eit (MpegTSBase * base,
@@ -114,6 +116,7 @@
 
   element_class = GST_ELEMENT_CLASS (klass);
   element_class->change_state = mpegts_base_change_state;
+  element_class->send_event = mpegts_base_send_event;
 
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&sink_template));
@@ -1054,6 +1057,38 @@
   return res;
 }
 
+static gboolean
+mpegts_base_send_event (GstElement *element, GstEvent *event)
+{
+	gboolean res = TRUE;
+	MpegTSBase *base = GST_MPEGTS_BASE (element);
+
+	GST_DEBUG_OBJECT (base, "Got event %s",
+		gst_event_type_get_name (GST_EVENT_TYPE (event)));
+
+	switch (GST_EVENT_TYPE (event)) {
+	  case GST_EVENT_CUSTOM_DOWNSTREAM:
+			{
+				GstMpegTsSection *section =	gst_event_parse_mpegts_section (event);
+				if (section)
+				{
+					mpegts_base_handle_psi (base, section);
+					gst_object_unref (section);
+					gst_event_unref(event);
+					res = TRUE;
+				}
+			}
+			break;
+		default:
+			break;
+	}
+
+	if(!res)
+		res = GST_ELEMENT_CLASS (parent_class)->send_event (element, event);
+
+	return res;
+}
+
 static void
 query_upstream_latency (MpegTSBase * base)
 {
