[gst-devel] incsched problem

Erik Walthinsen omega at temple-baptist.com
Tue Feb 20 21:20:11 CET 2001


OK, incsched works pretty well.  The current problem is a little sticky,
though.  I has to do with pipeline configuration.  My test code constructs
a pipeline

src -> identity -> identity2 -> sink

and runs it once.  It then disconnects the identity2 element and
reconnects identity -> sink.  When it goes to run the pipeline again, it
segfaults.

The segfault happens because sink (by accident the first to be switched
to) is still inside its gst_pad_pull, which puts it into the cothreaded
pullfunc_proxy.  Since the switch into it brings it back into the middle
of the pullfunc_proxy, we have a problem.  The problem is that the proxy
jumped into the middle of is running relative to the sink's peer pad,
which is still the src pad of the freshly removed identity2.  Since it's
been removed, the attempt to do anything with it faults.

Now, one potential solution would be to keep checking to see if the pad
passed to the proxy function is still the peer's peer.  I think this check
is only needed in the loops when bufpen is either full or empty (for push
or pull, resp.), after the cothread switch comes back.  It could simply
re-purpose itself to the new peer pad.  That might work, and I'll give
that a try first.

If that doesn't work, I'll have to find some way to shut down the
cothreads and restart them.  This has the potential for serious harm, for
any (loop-based) element that has a live state, but that's probably not
smart anyway.

      Erik Walthinsen <omega at temple-baptist.com> - System Administrator
        __
       /  \                GStreamer - The only way to stream!
      |    | M E G A        ***** http://gstreamer.net/ *****
      _\  /_





More information about the gstreamer-devel mailing list