mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 05:56:31 +00:00
playback-utils: Fix caps leak on failure
https://bugzilla.gnome.org/show_bug.cgi?id=789358
This commit is contained in:
parent
e7f77f3a01
commit
b927d60371
1 changed files with 4 additions and 0 deletions
|
@ -82,6 +82,10 @@ gst_playback_utils_get_n_common_capsfeatures (GstElementFactory * fact1,
|
|||
fact2_tmpl_caps = get_template_caps (fact2, GST_PAD_SINK);
|
||||
if (!fact1_tmpl_caps || !fact2_tmpl_caps) {
|
||||
GST_ERROR ("Failed to get template caps from decoder or sink");
|
||||
if (fact1_tmpl_caps)
|
||||
gst_caps_unref (fact1_tmpl_caps);
|
||||
else if (fact2_tmpl_caps)
|
||||
gst_caps_unref (fact2_tmpl_caps);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue