summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst-libs/gst/video/gstvideoaggregator.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
index a66ed3a35..2943036b3 100644
--- a/gst-libs/gst/video/gstvideoaggregator.c
+++ b/gst-libs/gst/video/gstvideoaggregator.c
@@ -842,7 +842,6 @@ gst_videoaggregator_pad_sink_getcaps (GstPad * pad, GstVideoAggregator * vagg,
{
GstCaps *srccaps;
GstCaps *template_caps;
- GstCaps *filtered_caps;
GstCaps *returned_caps;
GstStructure *s;
gboolean had_current_caps = TRUE;
@@ -870,14 +869,13 @@ gst_videoaggregator_pad_sink_getcaps (GstPad * pad, GstVideoAggregator * vagg,
NULL);
}
- filtered_caps = srccaps;
- if (filter)
- filtered_caps = gst_caps_intersect (srccaps, filter);
- returned_caps = gst_caps_intersect (filtered_caps, template_caps);
+ if (filter) {
+ returned_caps = gst_caps_intersect (srccaps, filter);
+ gst_caps_unref (srccaps);
+ } else {
+ returned_caps = srccaps;
+ }
- gst_caps_unref (srccaps);
- if (filter)
- gst_caps_unref (filtered_caps);
if (had_current_caps)
gst_caps_unref (template_caps);