Commit b927d603 authored by Ashish Kumar's avatar Ashish Kumar Committed by Tim-Philipp Müller
Browse files

playback-utils: Fix caps leak on failure
parent e7f77f3a
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment