mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
mpegtsmux: Push stream-start event before anything else
This commit is contained in:
parent
366339e4b2
commit
f0a1935119
1 changed files with 5 additions and 0 deletions
|
@ -1612,12 +1612,17 @@ mpegtsdemux_prepare_srcpad (MpegTsMux * mux)
|
||||||
GstSegment seg;
|
GstSegment seg;
|
||||||
/* we are not going to seek */
|
/* we are not going to seek */
|
||||||
GstEvent *new_seg;
|
GstEvent *new_seg;
|
||||||
|
gchar s_id[32];
|
||||||
GstCaps *caps = gst_caps_new_simple ("video/mpegts",
|
GstCaps *caps = gst_caps_new_simple ("video/mpegts",
|
||||||
"systemstream", G_TYPE_BOOLEAN, TRUE,
|
"systemstream", G_TYPE_BOOLEAN, TRUE,
|
||||||
"packetsize", G_TYPE_INT,
|
"packetsize", G_TYPE_INT,
|
||||||
(mux->m2ts_mode ? M2TS_PACKET_LENGTH : NORMAL_TS_PACKET_LENGTH),
|
(mux->m2ts_mode ? M2TS_PACKET_LENGTH : NORMAL_TS_PACKET_LENGTH),
|
||||||
NULL);
|
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);
|
gst_segment_init (&seg, GST_FORMAT_TIME);
|
||||||
new_seg = gst_event_new_segment (&seg);
|
new_seg = gst_event_new_segment (&seg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue