GNOME Bugzilla – Bug 577288
"Internal playbin error" when seeking to the end of files
Last modified: 2009-04-14 11:58:54 UTC
DESCRIPTION: When using "Songbird 1.1.1" on Mac/Linux/Win32, seeking to the end of a song using the seek bar sometimes results in an error message: "Internal playbin error." ******** Relevant log output ******** playbin2 gstplaybin2.c:1910:no_more_pads_cb:<player> no more pads in group 0x938ae0 (<unknown>:21033): GStreamer-CRITICAL **: gst_ghost_pad_new: assertion `!gst_pad_is_linked (target)' failed (<unknown>:21033): GStreamer-CRITICAL **: gst_pad_link_prepare: assertion `GST_IS_PAD (sinkpad)' failed playbin2 gstplaybin2.c:1925:no_more_pads_cb:<player> linked type audio/x-raw-, result: -6 playbin2 gstplaybin2.c:1929:no_more_pads_cb:<player> error: Internal playbin error. playbin2 gstplaybin2.c:1929:no_more_pads_cb:<player> error: Failed to link selector to sink. Error -6 ******** Relevant log output ******** POSSIBLE REASON: I'm a beginner to gstreamer, but it seems to me that the problem might be the following: 1. In gstplaysink.c (from gst-plugins-base 0.10.22, lines 1532-1546), an "audiotee" element is created lazily. 2. After that, a ghost pad is created (lines 1547-1552): playsink->audio_pad = gst_ghost_pad_new ("audio_sink", playsink->audio_tee_sink); 3. At some point, the ghost pad is released in gst_play_sink_release_pad() (lines 1592-1615). 4. Next time when a ghost pad is created in step 2 above, the "playsink->audio_tee_sink" element is still linked to some other element, therefore gst_ghost_pad_new() asserts and fails. So in short, the problem seems to be that no one unlinks the audio_tee_sink element from its peer. SUGGESTION: Unlink the audio_tee_sink element in gst_play_sink_release_pad(). For example, add the following line to gstplaysink.c (line 1603): gst_pad_unlink(playsink->audio_tee_sink->peer, playsink->audio_tee_sink); So that it will look like; } else if (pad == playsink->audio_pad) { res = &playsink->audio_pad; gst_pad_unlink(playsink->audio_tee_sink->peer, playsink->audio_tee_sink); // line 1603 } else if (pad == playsink->text_pad) { This solves the problem for me, and it seems that it does not introduce any other problems.
Removing the ghostpad from the element should also unlink anything it was linked to (the audio_tee_sink). So, I don't quite see how this could fail here unless there is something else going on.
Along with the other fixes that will go into 0.10.23, this patch should also fix the issue. Please test and reopen if the problem still persists. commit 5eed96dc06b73a63b9401265baed281e49b2dbf4 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Tue Apr 14 13:51:41 2009 +0200 playbin2: clear the target Clear the target of our ghostpads before we remove the pad from the element. This to make sure that the internal pad is not left linked to whatever pad we were ghosted to. This should only be a problem when we leak the ghostpads. Also release our subpicture pads. Fixes #577288.