videotestsrc: Fix a leak when computing alpha caps
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 30 Apr 2021 15:12:55 +0000 (20:42 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 30 Apr 2021 15:16:08 +0000 (20:46 +0530)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1131>

gst/videotestsrc/gstvideotestsrc.c

index 7a7ccc7..f06f252 100644 (file)
@@ -472,6 +472,7 @@ gst_video_test_src_src_fixate (GstBaseSrc * bsrc, GstCaps * caps)
     } else {
       gst_caps_replace (&caps, alpha_only_caps);
     }
+    gst_caps_unref (alpha_only_caps);
   }
 
   caps = gst_caps_make_writable (caps);