Skip to content
Snippets Groups Projects
Commit 76e35a90 authored by Ashish Kumar's avatar Ashish Kumar Committed by Sebastian Dröge
Browse files

playback-utils: Fix caps leak on failure

https://bugzilla.gnome.org/show_bug.cgi?id=789358
parent 7979a3ed
No related branches found
No related tags found
Loading
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment