GNOME Bugzilla – Bug 692508
gst_element_get_compatible_pad_template: use gst_pad_get_pad_template
Last modified: 2018-11-03 12:16:50 UTC
Created attachment 234371 [details] [review] 0001-gst_element_get_compatible_pad_template-use-gst_pad_.patch motivation comes from: /* FIXME: why not gst_pad_get_pad_template (pad); */ this code path is quite nicer, we now only revert to creating the template if gst_pad_get_pad_template fails. with this fork, we gain a non-allocation of GstCaps *templcaps Signed-off-by: Niv Sardi <xaiki@evilgiggle.com>
this used to be unsuable: gst_pad_get_pad_template () Returns : the GstPadTemplate from which this pad was instantiated, or NULL if this pad has no template. FIXME: currently returns an unrefcounted padtemplate. [transfer none] but has been fixed by: commit b5bc5b459ad888766b8f9c81b48f830018294e5e Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue May 17 11:59:00 2011 +0200 pad: Let template related functions return new references gst_pad_template_get_caps(), gst_pad_get_pad_template_caps() and gst_pad_get_pad_template() return a new reference of the caps or template now and the return value needs to be unreffed after usage.
NOTE: we still do correctly unref the template. we could be sainter than the saints and try to check if it was actually allocated (can gst_pad_template_new really fail ?!) but I don't think it's mandatory.
*** Bug 693715 has been marked as a duplicate of this bug. ***
sorry 'bout the dup, I couldn't find this bug in my mail.
commit 1a1a9e143fb0e155d7627aa8e489cd5d04bc093c Author: Niv Sardi <xaiki@evilgiggle.com> Date: Fri Jan 25 06:50:27 2013 -0300 utils: Use gst_pad_get_pad_template() in gst_element_get_compatible_pad_template() motivation comes from: /* FIXME: why not gst_pad_get_pad_template (pad); */ this code path is quite nicer, we now only revert to creating the template if gst_pad_get_pad_template fails. with this fork, we gain a non-allocation of GstCaps *templcaps https://bugzilla.gnome.org/show_bug.cgi?id=692508
This appears to break the pipelines/tagschecking unit test in -good for some reason.
commit 6c7573226e307a87ec06fb43ce157a2ad767073c Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Thu Feb 14 14:09:13 2013 +0000 Revert "utils: Use gst_pad_get_pad_template() in gst_element_get_compatible_pad_template()" This reverts commit 1a1a9e143fb0e155d7627aa8e489cd5d04bc093c. This breaks the pipelines/tagschecking unit test for some reason (fakesrc ! capsfilter ! qtmux linking fails now). It might be a bug in the unit test of course, but someone will need to investigate this. Reverting for now. https://bugzilla.gnome.org/show_bug.cgi?id=692508
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/33.