[gstreamer-bugs] [Bug 358999] New: [PATCH] [GstPad] Flushing on blocked pads not handled correctly.

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Oct 2 06:42:43 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=358999

  GStreamer | gstreamer (core) | Ver: HEAD CVS

           Summary: [PATCH] [GstPad] Flushing on blocked pads not handled
                    correctly.
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: bilboed at bilboed.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Currently flushing on blocked pads isn't done correctly.

FLUSH_START/FLUSH_STOP events are discarded if the pad is BLOCKED. The problem
is that GST_PAD_IS_BLOCKED() isn't good enough. Nothing tells us whether the
pad is actually blocking on something. If it is not, then those flushing events
should be forwarded downstream.

This can be seen clearly with the following example.

[  A   src.] ---- [sink  B  src] ---- [sink  C  ]

A, B and C are elements. C is blocking the stream (sink in preroll state for
example, or a filled queue).

If you block B.src (gst_pad_set_blocked_async(..TRUE...)), the pad is
considered as blocked.

Let's assume you send a flushing seek, in order for the stream lock to be
released (needed to safely unlink B.src for example).

Currently, B.src will discard the FLUSH_START/FLUSH_STOP events because it sees
that GST_PAD_IS_BLOCKED() is TRUE, which means the downstream locking element
or pad will never release the Stream Lock.
It should in fact only discard the FLUSH_START/FLUSH_STOP events if the pad is
REALLY BLOCKING on an event or buffer.


The following patch adds a GstPadFlag GST_PAD_BLOCKING, which is only set
between:
_the moment when an object is really blocking in the pad,
_and the moment the pad is no longer flushing

The handle_pad_block() and gst_pad_send_event() are modified accordingly, so
that:
_the flag above is properly set and unset,
_and the FLUSH_START/FLUSH_STOP events are forwarded if the GST_PAD_BLOCKING
flag is not set.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email




More information about the Gstreamer-bugs mailing list