From b2b8e775664fa35130e4617fd7cceb846939550b Mon Sep 17 00:00:00 2001 From: Garima Gaur Date: Mon, 28 Nov 2016 17:12:26 +0530 Subject: [PATCH] subtitleoverlay: Fix caps memory leak when failing to get sinkpad from subtitle renderer https://bugzilla.gnome.org/show_bug.cgi?id=775224 --- gst/playback/gstsubtitleoverlay.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index 65159e8d4a..c4c3cd26de 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -931,6 +931,8 @@ _link_renderer (GstSubtitleOverlay * self, GstElement * renderer, sink = _get_video_pad (renderer); if (G_UNLIKELY (!sink)) { GST_WARNING_OBJECT (self, "Can't get video sink from renderer"); + if (video_caps) + gst_caps_unref (video_caps); return FALSE; } allowed_caps = gst_pad_query_caps (sink, NULL); -- 2.34.1