playbin3: fix stream leak
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 14 Jul 2016 08:33:38 +0000 (10:33 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 18 Jul 2016 12:58:39 +0000 (13:58 +0100)
The stream returned by gst_message_streams_selected_get_stream() is
reffed.

https://bugzilla.gnome.org/show_bug.cgi?id=768811

gst/playback/gstplaybin3.c

index a68a722..588c572 100644 (file)
@@ -3128,8 +3128,11 @@ gst_play_bin3_handle_message (GstBin * bin, GstMessage * msg)
       update_combiner_info (playbin);
       len = gst_message_streams_selected_get_size (msg);
       for (i = 0; i < len; i++) {
-        set_selected_stream (playbin,
-            gst_message_streams_selected_get_stream (msg, i));
+        GstStream *stream;
+
+        stream = gst_message_streams_selected_get_stream (msg, i);
+        set_selected_stream (playbin, stream);
+        gst_object_unref (stream);
       }
       if (pstate)
         playbin->do_stream_selections = FALSE;