mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
qtdemux: fix suboptimal queue iteration code
This commit is contained in:
parent
0fbf5f3d9e
commit
604cc2a548
1 changed files with 4 additions and 5 deletions
|
@ -6980,6 +6980,8 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream->pad) {
|
if (stream->pad) {
|
||||||
|
GList *l;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (qtdemux, "adding pad %s %p to qtdemux %p",
|
GST_DEBUG_OBJECT (qtdemux, "adding pad %s %p to qtdemux %p",
|
||||||
GST_OBJECT_NAME (stream->pad), stream->pad, qtdemux);
|
GST_OBJECT_NAME (stream->pad), stream->pad, qtdemux);
|
||||||
gst_element_add_pad (GST_ELEMENT_CAST (qtdemux), stream->pad);
|
gst_element_add_pad (GST_ELEMENT_CAST (qtdemux), stream->pad);
|
||||||
|
@ -6993,11 +6995,8 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
|
||||||
stream->send_global_tags = TRUE;
|
stream->send_global_tags = TRUE;
|
||||||
/* send upstream GST_EVENT_PROTECTION events that were received before
|
/* send upstream GST_EVENT_PROTECTION events that were received before
|
||||||
this source pad was created */
|
this source pad was created */
|
||||||
for (int i = 0; i < qtdemux->protection_event_queue.length; ++i) {
|
for (l = qtdemux->protection_event_queue.head; l != NULL; l = l->next)
|
||||||
GstEvent *event =
|
gst_pad_push_event (stream->pad, gst_event_ref (l->data));
|
||||||
(GstEvent *) g_queue_peek_nth (&qtdemux->protection_event_queue, i);
|
|
||||||
gst_pad_push_event (stream->pad, gst_event_ref (event));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
if (list)
|
if (list)
|
||||||
|
|
Loading…
Reference in a new issue