Skip to content

Commit

Permalink
gl/stereo: fix a coupld of caps leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ystreet committed Jun 3, 2021
1 parent 33c60bd commit f647840
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ext/gl/gstglstereomix.c
Expand Up @@ -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;
}
Expand Down
6 changes: 5 additions & 1 deletion ext/gl/gstglstereosplit.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f647840

Please sign in to comment.