From 788074733cb9fe4d23209ca158fc88d281333583 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 5 Mar 2015 09:35:32 +0100 Subject: [PATCH] rtspsrc: Make sure to send SEGMENT events on all pads --- gst/rtsp/gstrtspsrc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index f30ff08..89ab84d 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -4564,12 +4564,15 @@ gst_rtspsrc_handle_data (GstRTSPSrc * src, GstRTSPMessage * message) gchar *uri; GList *streams; guint group_id = gst_util_group_id_next (); + GstSegment segment; /* generate an SHA256 sum of the URI */ cs = g_checksum_new (G_CHECKSUM_SHA256); uri = src->conninfo.location; g_checksum_update (cs, (const guchar *) uri, strlen (uri)); + gst_segment_init (&segment, GST_FORMAT_TIME); + for (streams = src->streams; streams; streams = g_list_next (streams)) { GstRTSPStream *ostream = (GstRTSPStream *) streams->data; GstCaps *caps; @@ -4585,6 +4588,13 @@ gst_rtspsrc_handle_data (GstRTSPSrc * src, GstRTSPMessage * message) if ((caps = stream_get_caps_for_pt (ostream, ostream->default_pt))) { gst_rtspsrc_stream_push_event (src, ostream, gst_event_new_caps (caps)); } + + /* Push a SEGMENT event if we don't have one pending, if we have one + * pending we will just send that one a few lines below to all pads + */ + if (!src->start_segment) + gst_rtspsrc_stream_push_event (src, ostream, + gst_event_new_segment (&segment)); } g_checksum_free (cs); -- 2.7.4