summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2020-03-12 11:22:56 +0100
committerTim-Philipp Müller <tim@centricular.com>2020-03-13 12:37:16 +0000
commit679ec82e9d3404059e89136f656c9a5f091caf1a (patch)
tree5149defc2050d16ce317db16c6cc025f1bbf1a33
parentd73cda4fd13e27379036aee6c9e40436724fc10e (diff)
videomixer: Don't leak peer caps
-rw-r--r--gst/videomixer/videomixer2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c
index c6f2da8a7..c4e268492 100644
--- a/gst/videomixer/videomixer2.c
+++ b/gst/videomixer/videomixer2.c
@@ -258,6 +258,7 @@ gst_videomixer2_update_src_caps (GstVideoMixer2 * mix)
tmp = gst_caps_intersect (caps, peercaps);
gst_caps_unref (caps);
gst_caps_unref (peercaps);
+ peercaps = NULL;
caps = tmp;
if (gst_caps_is_empty (caps)) {
GST_DEBUG_OBJECT (mix, "empty caps");
@@ -277,6 +278,8 @@ gst_videomixer2_update_src_caps (GstVideoMixer2 * mix)
gst_structure_get_int (s, "height", &info.height);
gst_structure_get_fraction (s, "fraction", &info.fps_n, &info.fps_d);
}
+ if (peercaps)
+ gst_caps_unref (peercaps);
gst_caps_unref (caps);
caps = gst_video_info_to_caps (&info);