tools: fix device leaks in gst-device-monitor

gst_message_parse_device_{added,removed} is actually returning a new ref
on the device.

https://bugzilla.gnome.org/show_bug.cgi?id=768776
This commit is contained in:
Guillaume Desmottes 2016-07-13 15:45:33 +02:00 committed by Tim-Philipp Müller
parent 54e4551cd8
commit a3c47a0754

View file

@ -128,10 +128,12 @@ bus_msg_handler (GstBus * bus, GstMessage * msg, gpointer user_data)
case GST_MESSAGE_DEVICE_ADDED:
gst_message_parse_device_added (msg, &device);
device_added (device);
gst_object_unref (device);
break;
case GST_MESSAGE_DEVICE_REMOVED:
gst_message_parse_device_removed (msg, &device);
device_removed (device);
gst_object_unref (device);
break;
default:
g_print ("%s message\n", GST_MESSAGE_TYPE_NAME (msg));