From 5b78110813ada540c5aaa4e43007e63ee5ef671a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 30 May 2016 15:42:24 +0200 Subject: [PATCH] validate: fix pad leaks Pads returned using the playbin get-{audio,video}-pad are reffed. Reviewed-by: Thibault Saunier Differential Revision: https://phabricator.freedesktop.org/D1027 --- validate/tools/gst-validate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/validate/tools/gst-validate.c b/validate/tools/gst-validate.c index b6203e0141..0a5ef66adf 100644 --- a/validate/tools/gst-validate.c +++ b/validate/tools/gst-validate.c @@ -358,6 +358,9 @@ _execute_switch_track (GstValidateScenario * scenario, res = GST_VALIDATE_EXECUTE_ACTION_ERROR; } + if (oldpad) + gst_object_unref (oldpad); + gst_object_unref (newpad); } else { gst_validate_printf (action, "Disabling track type %s", type); }