ghostpad: Do not try to be smarter than possible with seqnum

We can have several CAPS event comming at any time and thuse we will
need to rely on elements to handle their seqnum properly as we can not
do a safe guard at our level

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
This commit is contained in:
Thibault Saunier 2014-07-11 17:23:29 +02:00
parent c256fd1486
commit d038e53db8

View file

@ -334,23 +334,11 @@ internalpad_event_function (GstPad * internal, GstObject * parent,
GST_DEBUG_OBJECT (object, "Setting wanted_seqnum to %i",
object->wanted_seqnum);
break;
case GST_EVENT_CAPS:
if (object->wanted_seqnum != 0) {
GST_ERROR_OBJECT (object, "Got caps, seqnum-> %i (wanted %i)",
gst_event_get_seqnum (event), object->wanted_seqnum);
object->seqnum = object->wanted_seqnum;
object->wanted_seqnum = 0;
gst_event_set_seqnum (event, object->seqnum);
}
break;
case GST_EVENT_SEGMENT:
event = translate_outgoing_segment (object, event);
if (object->seqnum) {
GST_INFO_OBJECT (object, "Tweaking SEGMENT seqnum from %i to %i",
gst_event_get_seqnum (event), object->seqnum);
gst_event_set_seqnum (event, object->seqnum);
if (object->wanted_seqnum == gst_event_get_seqnum (event)) {
object->seqnum = object->wanted_seqnum;
object->wanted_seqnum = 0;
}
break;
case GST_EVENT_EOS: