GNOME Bugzilla – Bug 421055
GstGhostPad fails when set to PLAYING for the second time
Last modified: 2007-04-12 16:22:37 UTC
When using gnonlin to play a file in Jokosher, then stopping the playback and starting it again the following error is returned: (Jokosher:17932): GStreamer-CRITICAL **: Padname '':src does not belong to element gnlsource0 when removing (Jokosher:17932): GStreamer-CRITICAL **: gst_pad_set_active: assertion `GST_IS_PAD (pad)' failed I've tracked this problem down to revision 1.49 of gstghostpad.c To reproduce: 1. Start Jokosher 2. Add an instrument 3. Import a file 4. Press play 5. Press stop 6. Press play With a version of GStreamer prior to this commit everything works as expected, however after 1.49 playback stops and the error is seen. Attached is a GST_DEBUG=5.
GST_DEBUG log can be found at: http://mikeasoft.com/~mike/log.gz
Here is the exact diff causing this: http://webcvs.freedesktop.org/gstreamer/gstreamer/gst/gstghostpad.c?r1=1.48&r2=1.49 And Wim commit message: docs/design/part-gstghostpad.txt: * gst/gstghostpad.c: (gst_ghost_pad_class_init), (gst_ghost_pad_internal_do_activate_push), (gst_ghost_pad_internal_do_activate_pull), (gst_ghost_pad_do_activate_push), (gst_ghost_pad_do_activate_pull), (gst_ghost_pad_do_link), (gst_ghost_pad_dispose), (gst_ghost_pad_new_full), (gst_ghost_pad_set_target): Do not set the internal pad as a parent anymore so we can avoid hierarchy linking errors when the ghostpad has no parent yet. This also fixes failed activation because of unlinked internal pads, which in turn fixes the impossible case where you have to activate a pad before you can add it to a running element. Also fix the docs. * gst/gstpad.c: (pre_activate), (post_activate), (gst_pad_set_active), (gst_pad_activate_pull), (gst_pad_activate_push), (gst_pad_check_pull_range): Add some more debug info. Mark activation mode in pre_activate so that we don't try to activate in endless loops. Fixes #385084.
It was in fact a small bug in gnonlin. It wasn't setting the ghostpad target to NULL before removing it. It's now fixed in gnonlin.