From 25a2c2387e78384ac511a5be77ba7cd6e48cb9d7 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Tue, 8 Jul 2014 22:57:22 +0200 Subject: [PATCH] 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 --- gnl/gnlghostpad.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gnl/gnlghostpad.c b/gnl/gnlghostpad.c index 237dce1..989c440 100644 --- a/gnl/gnlghostpad.c +++ b/gnl/gnlghostpad.c @@ -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; -- 2.7.4