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 762461 - gst_link_filtered returns TRUE for incompatibles pads
gst_link_filtered returns TRUE for incompatibles pads
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.x
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-02-22 14:34 UTC by Hoël Vasseur
Modified: 2016-05-22 17:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hoël Vasseur 2016-02-22 14:34:10 UTC
Hi 

I tried to filters out some videos. I used gst_link_filtered, and gst_element_linkpads_filtered to filter out videos with a wrong resolution. However, the filter works fine using raw video formats, but always returns true when using mpeg4 videos. 
example: here the filter caps creation 

GstCaps	*caps = gst_caps_new_simple ("video/mpeg",
                                     "width", G_TYPE_INT, 384,
                                     "height", G_TYPE_INT, 288,
                                     "mpegversion", G_TYPE_INT, 4,
                                     NULL);

the video source caps: 
video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, profile=(string)simple, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1

assertions:
gst_element_link_filtered (src, dest, caps)
gst_element_link_pads_filtered (src, NULL, dest, NULL, caps)

both return TRUE.

According to resolution, they should not.

Look into the source code: gstpad.c, and 
gst_pad_link_prepare returns GST_PAD_LINK_OK, I  think it should not.
I see that there is a "fixme" in the function.
Comment 1 Sebastian Dröge (slomo) 2016-02-23 09:30:05 UTC
Can you provide a testcase for reproducing it, and/or a GST_DEBUG=6 debug log?
Comment 2 Tim-Philipp Müller 2016-04-12 17:09:15 UTC
Hoël ?
Comment 3 Tim-Philipp Müller 2016-05-22 17:51:17 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!