[gstreamer-bugs] [Bug 503592] gstpad.c does many ref/unref of peer pad in dataflow

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Fri Dec 14 07:35:20 PST 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=503592

  GStreamer | gstreamer (core) | Ver: HEAD CVS

Wim Taymans changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wim.taymans at gmail.com




------- Comment #4 from Wim Taymans  2007-12-14 15:35 UTC -------
Not very practical, the unref happens at an undefined time and can keep the
sinkpad lingering on for as long as the srcpad is alive.

Just as a brain dump:

_pad_push (pad, buffer)
{
  LOCK (pad)
  peer = pad->peer;
  if (!peer)
    goto no_peer;
  chain_func = pad->peer_chain;
  if (chain_func != peer->chain)
    pad->peer_chain = chain_func;
  GST_STREAM_LOCK (peer);
  UNLOCK (pad)

  res = chain_func (peer); 

  GST_STREAM_UNLOCK (peer);

  return res;

no_peer:
  {
    UNLOCK (pad);
    return NOT_LINKED;
  }
}

This example uses a nested lock, there is no way the pad can get unlinked when
the pad lock is taken and we can be sure that the pad is not unreffed when we
have the stream_lock. Not sure this is correct...


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=503592.




More information about the Gstreamer-bugs mailing list