From f0a1935119c6572bd320c7605d53815fbc4c8092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 15 May 2013 11:38:35 +0200 Subject: [PATCH] mpegtsmux: Push stream-start event before anything else --- gst/mpegtsmux/mpegtsmux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index ed5f98823e..5723559069 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -1612,12 +1612,17 @@ mpegtsdemux_prepare_srcpad (MpegTsMux * mux) GstSegment seg; /* we are not going to seek */ GstEvent *new_seg; + gchar s_id[32]; GstCaps *caps = gst_caps_new_simple ("video/mpegts", "systemstream", G_TYPE_BOOLEAN, TRUE, "packetsize", G_TYPE_INT, (mux->m2ts_mode ? M2TS_PACKET_LENGTH : NORMAL_TS_PACKET_LENGTH), NULL); + /* stream-start (FIXME: create id based on input ids) */ + g_snprintf (s_id, sizeof (s_id), "mpegtsmux-%08x", g_random_int ()); + gst_pad_push_event (mux->srcpad, gst_event_new_stream_start (s_id)); + gst_segment_init (&seg, GST_FORMAT_TIME); new_seg = gst_event_new_segment (&seg);