summaryrefslogtreecommitdiff
path: root/gst/isomp4/qtdemux.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-08-10 12:45:27 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-08-10 12:45:50 +0100
commit604cc2a54812eeb46512c8073d9d01cf8087f592 (patch)
tree4b8e1e5485539fa70313e9913feaa5f52c991b8a /gst/isomp4/qtdemux.c
parent0fbf5f3d9ef3d3bd0b312725cd290d8b5d969f2d (diff)
downloadgstreamer-plugins-good-604cc2a54812eeb46512c8073d9d01cf8087f592.tar.gz
qtdemux: fix suboptimal queue iteration code
Diffstat (limited to 'gst/isomp4/qtdemux.c')
-rw-r--r--gst/isomp4/qtdemux.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index 8a40ea1a2..eeacca113 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -6980,6 +6980,8 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
}
if (stream->pad) {
+ GList *l;
+
GST_DEBUG_OBJECT (qtdemux, "adding pad %s %p to qtdemux %p",
GST_OBJECT_NAME (stream->pad), stream->pad, qtdemux);
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;
/* send upstream GST_EVENT_PROTECTION events that were received before
this source pad was created */
- for (int i = 0; i < qtdemux->protection_event_queue.length; ++i) {
- GstEvent *event =
- (GstEvent *) g_queue_peek_nth (&qtdemux->protection_event_queue, i);
- gst_pad_push_event (stream->pad, gst_event_ref (event));
- }
+ for (l = qtdemux->protection_event_queue.head; l != NULL; l = l->next)
+ gst_pad_push_event (stream->pad, gst_event_ref (l->data));
}
done:
if (list)