After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 300339 - assertion with gst_pad_relink_filtered
assertion with gst_pad_relink_filtered
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.8.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-12 14:31 UTC by Luca Ognibene
Modified: 2005-04-23 16:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case (1.30 KB, text/x-csrc)
2005-04-12 14:32 UTC, Luca Ognibene
Details

Description Luca Ognibene 2005-04-12 14:31:27 UTC
Try the simple test case attached. I'm getting this assertion:
(process:12014): GStreamer-CRITICAL **: gst_pad_link_prepare: assertion
`GST_RPAD_PEER (realsrc) == NULL' failed

btw, i'm using cvs from about a month ago. 
thaytan on irc told me to file a bug anyway
Comment 1 Luca Ognibene 2005-04-12 14:32:07 UTC
Created attachment 45174 [details]
test case
Comment 2 Luca Ognibene 2005-04-12 14:42:23 UTC
This seems to work (tried in paused and playing state):

 pad2 = gst_pad_get_peer (pad);
 gst_pad_unlink (pad, pad2);
 gst_pad_link_filtered (pad, pad2, caps);

Comment 3 Ronald Bultje 2005-04-15 09:30:19 UTC
In line 2278/2279 of gstpad.c, it assumes pads are unlinked, which is invalid:

  g_return_val_if_fail (GST_RPAD_PEER (realsrc) == NULL, NULL);
  g_return_val_if_fail (GST_RPAD_PEER (realsink) == NULL, NULL);

Commenting those two out should make it work. The weird thing is that
_relink_filtered() is the only function calling that function containing those
two assertions, so it may very well have been broken for a very long time already.
Comment 4 Ronald Bultje 2005-04-22 15:20:25 UTC
Ping, Luca, does my suggestion fix it?
Comment 5 Luca Ognibene 2005-04-23 12:37:39 UTC
yes, it seems to work fine. The test case now works :) I'm not using this code
anymore in my application so i can't do a full test..