mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
adder: set a group-id on the stream-start event
Set a default group-id to fix a warning printed by the sink.
This commit is contained in:
parent
5648457e22
commit
6cc7204f95
1 changed files with 8 additions and 2 deletions
|
@ -1194,11 +1194,17 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
|
|||
|
||||
if (adder->send_stream_start) {
|
||||
gchar s_id[32];
|
||||
GstEvent *event;
|
||||
|
||||
GST_INFO_OBJECT (adder->srcpad, "send pending stream start event");
|
||||
/* stream-start (FIXME: create id based on input ids) */
|
||||
/* FIXME: create id based on input ids, we can't use
|
||||
* gst_pad_create_stream_id() though as that only handles 0..1 sink-pad
|
||||
*/
|
||||
g_snprintf (s_id, sizeof (s_id), "adder-%08x", g_random_int ());
|
||||
if (!gst_pad_push_event (adder->srcpad, gst_event_new_stream_start (s_id))) {
|
||||
event = gst_event_new_stream_start (s_id);
|
||||
gst_event_set_group_id (event, gst_util_group_id_next ());
|
||||
|
||||
if (!gst_pad_push_event (adder->srcpad, event)) {
|
||||
GST_WARNING_OBJECT (adder->srcpad, "Sending stream start event failed");
|
||||
}
|
||||
adder->send_stream_start = FALSE;
|
||||
|
|
Loading…
Reference in a new issue