subtitleoverlay: Fix caps memory leak when failing to get sinkpad from subtitle renderer

https://bugzilla.gnome.org/show_bug.cgi?id=775224
This commit is contained in:
Garima Gaur 2016-11-28 17:12:26 +05:30 committed by Sebastian Dröge
parent 4efc15dffb
commit b2b8e77566

View file

@ -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);