videoaggregator: unref temporary caps
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Mon, 16 May 2022 16:34:36 +0000 (12:34 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 16 May 2022 22:38:13 +0000 (22:38 +0000)
The "possible_caps" needs unref after finished using to
avoid memory leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2430>

subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c

index 0f7d7b3..56396d9 100644 (file)
@@ -1063,6 +1063,8 @@ gst_video_aggregator_find_best_format (GstVideoAggregator * vagg,
         gst_caps_unref (possible_caps);
         continue;
       }
+
+      gst_caps_unref (possible_caps);
     }
 
     /* If the format is supported, consider it very high weight */