playbin3: fix leaks of collection returned by message parse API
[platform/upstream/gstreamer.git] / tests / examples / decodebin_next / decodebin3.c
index 2eb2a68..53a8249 100644 (file)
@@ -223,6 +223,7 @@ _on_bus_message (GstBus * bus, GstMessage * message, MyDataStruct * data)
           /* In 5s try to change streams */
           data->timeout_id =
               g_timeout_add_seconds (5, (GSourceFunc) switch_streams, data);
+        gst_object_unref (collection);
       }
       break;
     }