wrappercamerabinsrc: fix leak of drain query

gst_pad_peer_query doesn't take ownership of the query object
This commit is contained in:
Thiago Santos 2015-04-20 08:42:56 -03:00
parent b74770bd05
commit ef5b7ca93e

View file

@ -223,7 +223,10 @@ static void
gst_wrapper_camera_bin_src_set_output (GstWrapperCameraBinSrc * self,
GstPad * old_pad, GstPad * output_pad)
{
gst_pad_peer_query (self->src_pad, gst_query_new_drain ());
GstQuery *drain = gst_query_new_drain ();
gst_pad_peer_query (self->src_pad, drain);
gst_query_unref (drain);
if (old_pad)
gst_ghost_pad_set_target (GST_GHOST_PAD (old_pad), NULL);
if (output_pad)