mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
gstdtlsenc: fix stream_id and missing group_id
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5425>
This commit is contained in:
parent
a426e76d3e
commit
2f115847c2
1 changed files with 8 additions and 3 deletions
|
@ -480,13 +480,18 @@ src_task_loop (GstPad * pad)
|
||||||
|
|
||||||
if (self->send_initial_events) {
|
if (self->send_initial_events) {
|
||||||
GstSegment segment;
|
GstSegment segment;
|
||||||
gchar s_id[32];
|
gchar *stream_id;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
GstEvent *stream_start_event;
|
||||||
|
|
||||||
self->send_initial_events = FALSE;
|
self->send_initial_events = FALSE;
|
||||||
|
|
||||||
g_snprintf (s_id, sizeof (s_id), "dtlsenc-%08x", g_random_int ());
|
stream_id =
|
||||||
gst_pad_push_event (self->src, gst_event_new_stream_start (s_id));
|
gst_pad_create_stream_id (self->src, GST_ELEMENT_CAST (self), NULL);
|
||||||
|
stream_start_event = gst_event_new_stream_start (stream_id);
|
||||||
|
gst_event_set_group_id (stream_start_event, gst_util_group_id_next ());
|
||||||
|
gst_pad_push_event (self->src, stream_start_event);
|
||||||
|
g_free (stream_id);
|
||||||
caps = gst_caps_new_empty_simple ("application/x-dtls");
|
caps = gst_caps_new_empty_simple ("application/x-dtls");
|
||||||
gst_pad_push_event (self->src, gst_event_new_caps (caps));
|
gst_pad_push_event (self->src, gst_event_new_caps (caps));
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
Loading…
Reference in a new issue