[Bug 765049] pad: Offset handling inconsistencies

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Jul 2 15:23:08 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=765049

--- Comment #7 from Vivia Nikolaidou <vivia at ahiru.eu> ---
Created attachment 330790
  --> https://bugzilla.gnome.org/attachment.cgi?id=330790&action=edit
0001-pad-Handle-offsets-and-sticky-events-more-consistent.patch

Now storing the original event and only passing the copy around. It works, but
it fails in the gstfunnel.c check.

In the check it fails after the second gap event that I'm pasting:

  /* push a gap event to srcpad2 to push sticky events */
  fail_unless (gst_pad_push_event (td.mysrc2, gst_event_new_gap (0,
              GST_SECOND)));

  fail_unless (nb_stream_start_event == 2);
  fail_unless (nb_caps_event == 2);
  fail_unless (nb_segment_event == 2);
  fail_unless (nb_gap_event == 2);

  /* push a gap event to srcpad2 */
  fail_unless (gst_pad_push_event (td.mysrc2, gst_event_new_gap (0,
              GST_SECOND)));

  fail_unless (nb_stream_start_event == 2);
  fail_unless (nb_caps_event == 2);
  fail_unless (nb_segment_event == 2);
  fail_unless (nb_gap_event == 3);

Which leads me to this code:
static gboolean
gst_funnel_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
[...]
  } else if (GST_EVENT_TYPE (event) == GST_EVENT_GAP) {
    /* If no data is coming and we receive GAP event, need to forward sticky
events. */
    unlock = TRUE;
    GST_PAD_STREAM_LOCK (funnel->srcpad);
    GST_OBJECT_LOCK (funnel);
    gst_object_replace ((GstObject **) & funnel->last_sinkpad,
        GST_OBJECT (pad));
    GST_OBJECT_UNLOCK (funnel);
    gst_pad_sticky_events_foreach (pad, forward_events, funnel->srcpad);


By reading that code, I am not sure why that failing check is there at all, I
deduce that the element is now working as expected. Of course, I might have
missed something here, so please feedback.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list