GNOME Bugzilla – Bug 751235
utils: get_compatible_pad does not fully respect filter caps
Last modified: 2015-06-22 20:23:00 UTC
When trying to get a compatible pad from an element that has request pads the filter caps is not used when trying to get a pad template to request the pad. In this case it is ignored and might lead to getting a pad that is incompatible with the filter.
Created attachment 305712 [details] [review] utils: use caps when getting a compatible pad by template Do not ignore the caps argument when requesting a pad by template. This is particularly harmful when the pad caps query by default returns ANY so it will match the first template instead of the one that actually intersects with the caps.
Comment on attachment 305712 [details] [review] utils: use caps when getting a compatible pad by template That also obsoletes the FIXME then I guess?
Created attachment 305836 [details] [review] utils: use caps when getting a compatible pad by template Ah, yes. Removed it, thanks.
Created attachment 305846 [details] [review] tests: gstutils: add tests for gst_element_get_compatible_pad As a bonus, some unit tests
Thanks for the reviews. Pushed. commit c1a9a3424de4e6892db0fa5ff031b93502610dca Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Mon Jun 22 14:30:49 2015 -0300 tests: gstutils: add tests for gst_element_get_compatible_pad Adds tests for gst_element_get_compatible_pad for when it has to request pads. Note that these tests don't cover the case when it has to request a pad that already exists. https://bugzilla.gnome.org/show_bug.cgi?id=751235 commit 1418e9e85c2a98715132764ce2c34b9e1bf179cf Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Fri Jun 19 15:46:56 2015 -0300 utils: use caps when getting a compatible pad by template Do not ignore the caps argument when requesting a pad by template. This is particularly harmful when the pad caps query by default returns ANY so it will match the first template instead of the one that actually intersects with the caps. https://bugzilla.gnome.org/show_bug.cgi?id=751235