mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
gnlghostpad: Do not tolerate getting seeked when no target is set
This should not happen anymore + Do not set twice events seqnums Co-Authored by: Thibault Saunier <tsaunier@gnome.org>
This commit is contained in:
parent
73677edf60
commit
25a2c2387e
1 changed files with 4 additions and 8 deletions
|
@ -346,11 +346,8 @@ internalpad_event_function (GstPad * internal, GstObject * parent,
|
|||
object->wanted_seqnum = 0;
|
||||
|
||||
event = translate_outgoing_segment (object, event);
|
||||
gst_event_set_seqnum (event, object->seqnum);
|
||||
break;
|
||||
case GST_EVENT_EOS:
|
||||
if (object->seqnum);
|
||||
gst_event_set_seqnum (event, object->seqnum);
|
||||
if (object->seqnum)
|
||||
gst_event_set_seqnum (event, object->seqnum);
|
||||
GST_INFO_OBJECT (object, "Tweaking seqnum to %i", object->seqnum);
|
||||
|
@ -526,11 +523,11 @@ ghostpad_event_function (GstPad * ghostpad, GstObject * parent,
|
|||
object->wanted_seqnum = gst_event_get_seqnum (event);
|
||||
object->seqnum = 0;
|
||||
if (!(target = gst_ghost_pad_get_target (GST_GHOST_PAD (ghostpad)))) {
|
||||
priv->pending_seek = event;
|
||||
GST_INFO_OBJECT (ghostpad, "No target set yet, "
|
||||
"Will send the seek event when the target is set");
|
||||
ret = TRUE;
|
||||
g_assert ("Seeked a pad with not target SHOULD NOT HAPPEND");
|
||||
ret = FALSE;
|
||||
event = NULL;
|
||||
} else {
|
||||
gst_object_unref (target);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -543,7 +540,6 @@ ghostpad_event_function (GstPad * ghostpad, GstObject * parent,
|
|||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_SEGMENT:
|
||||
event = translate_incoming_segment (object, event);
|
||||
gst_event_set_seqnum (event, object->seqnum);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue