gl/stereo: fix a coupld of caps leaks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1187>
This commit is contained in:
Matthew Waters 2021-06-03 15:57:17 +10:00
parent 33c60bdbf9
commit f647840685
2 changed files with 6 additions and 1 deletions

View file

@ -644,6 +644,7 @@ _negotiated_caps (GstAggregator * agg, GstCaps * caps)
GST_GL_TEXTURE_TARGET_2D_STR, NULL);
gst_gl_view_convert_set_caps (mix->viewconvert, in_caps, caps);
gst_caps_unref (in_caps);
return TRUE;
}

View file

@ -808,6 +808,7 @@ stereosplit_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
case GST_QUERY_CAPS:
{
GstCaps *filter, *left, *right, *combined, *ret, *templ_caps;
gboolean result;
gst_query_parse_caps (query, &filter);
@ -856,11 +857,14 @@ stereosplit_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
gst_caps_intersect_full (combined, templ_caps,
GST_CAPS_INTERSECT_FIRST);
gst_caps_unref (templ_caps);
gst_caps_unref (combined);
GST_LOG_OBJECT (split, "Returning sink pad caps %" GST_PTR_FORMAT, ret);
gst_query_set_caps_result (query, ret);
return !gst_caps_is_empty (ret);
result = !gst_caps_is_empty (ret);
gst_caps_unref (ret);
return result;
}
default:
return gst_pad_query_default (pad, parent, query);