adaptivedemux: Handle SEEK event only once

send_event() of parent class (i.e., GstBinClass) iterates srcpads
to send SEEK event. And performing it per srcpad is inefficient.
So, let's drop duplicated SEEK event by checking seqnum

https://bugzilla.gnome.org/show_bug.cgi?id=776612
This commit is contained in:
Seungha Yang 2017-01-01 14:06:28 +09:00 committed by Sebastian Dröge
parent d59571e80e
commit 780c57d6bb

View file

@ -1571,6 +1571,13 @@ gst_adaptive_demux_src_event (GstPad * pad, GstObject * parent,
switch (event->type) {
case GST_EVENT_SEEK:
{
guint32 seqnum = gst_event_get_seqnum (event);
if (seqnum == demux->priv->segment_seqnum) {
GST_LOG_OBJECT (pad,
"Drop duplicated SEEK event seqnum %" G_GUINT32_FORMAT, seqnum);
gst_event_unref (event);
return TRUE;
}
return gst_adaptive_demux_handle_seek_event (demux, pad, event);
}
case GST_EVENT_RECONFIGURE:{