validate: fix pad leaks

Pads returned using the playbin get-{audio,video}-pad are reffed.

Reviewed-by: Thibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1027
This commit is contained in:
Guillaume Desmottes 2016-05-30 15:42:24 +02:00 committed by Thibault Saunier
parent dc7382017d
commit 5b78110813

View file

@ -358,6 +358,9 @@ _execute_switch_track (GstValidateScenario * scenario,
res = GST_VALIDATE_EXECUTE_ACTION_ERROR; res = GST_VALIDATE_EXECUTE_ACTION_ERROR;
} }
if (oldpad)
gst_object_unref (oldpad);
gst_object_unref (newpad);
} else { } else {
gst_validate_printf (action, "Disabling track type %s", type); gst_validate_printf (action, "Disabling track type %s", type);
} }