[gst-devel] patches for review

David Schleef ds at schleef.org
Wed Jul 14 11:46:05 CEST 2004


On Wed, Jul 14, 2004 at 02:55:19PM +0100, Andy Wingo wrote:
> I've had this one in my tree for a while. It establishes a new flag,
> GST_PAD_DISPATCHING, to be set on a pad when a function is traversing
> the link graph. If the flag is set, we know the pad has already been
> visited, so we don't need to recurse into it. Shouldn't affect
> cycle-containing graphs that don't have naive link functions.
> 
> I don't think link/getcaps/query/* functions are the proper place to fix
> this, because you have to somehow know which pad has been visited
> already.
> 
> +	(gst_pad_link_call_link_functions): Since this function is the
> +	only one to set the NEGOTIATING flag on a pad, if the flag is set
> +	it means that the link functions have indirectly recursed. If this
> +	happens, error out to avoid infinite recursion and an eventual
> +	SEGV.

The NEGOTIATING flag was to detect elements that were backtracking
on negotiation, i.e., the core would call the link function of the
srcpad, and the element would then call try_set_caps() on the
same pad.  Such bugs are effectively non-existent these days, so
changing the check to return OK might be wise.

Anyway, it's pretty clear that in 0.9, we need a negotiation
context token that is passed around during negotiation, in order
to effectively handle loop negotiation sucess and failure.



dave...





More information about the gstreamer-devel mailing list