pipewiresrc: plug leaks

Change-Id: If476d21c7a26abd2e905035af4969efb23b6ec4e
This commit is contained in:
David Svensson Fors 2017-06-21 11:17:12 +02:00 committed by Wim Taymans
parent cd9a71d7e6
commit 834da99c7c

View file

@ -635,6 +635,7 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
/* open a connection with these caps */ /* open a connection with these caps */
possible = gst_caps_to_format_all (caps, pwsrc->ctx->type.map); possible = gst_caps_to_format_all (caps, pwsrc->ctx->type.map);
gst_caps_unref (caps);
/* first disconnect */ /* first disconnect */
pw_thread_loop_lock (pwsrc->main_loop); pw_thread_loop_lock (pwsrc->main_loop);
@ -665,6 +666,7 @@ gst_pipewire_src_negotiate (GstBaseSrc * basesrc)
PW_STREAM_FLAG_AUTOCONNECT, PW_STREAM_FLAG_AUTOCONNECT,
possible->len, possible->len,
(struct spa_format **)possible->pdata); (struct spa_format **)possible->pdata);
g_ptr_array_free (possible, TRUE);
while (TRUE) { while (TRUE) {
enum pw_stream_state state = pwsrc->stream->state; enum pw_stream_state state = pwsrc->stream->state;