mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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:
parent
54e4551cd8
commit
a3c47a0754
1 changed files with 2 additions and 0 deletions
|
@ -128,10 +128,12 @@ bus_msg_handler (GstBus * bus, GstMessage * msg, gpointer user_data)
|
||||||
case GST_MESSAGE_DEVICE_ADDED:
|
case GST_MESSAGE_DEVICE_ADDED:
|
||||||
gst_message_parse_device_added (msg, &device);
|
gst_message_parse_device_added (msg, &device);
|
||||||
device_added (device);
|
device_added (device);
|
||||||
|
gst_object_unref (device);
|
||||||
break;
|
break;
|
||||||
case GST_MESSAGE_DEVICE_REMOVED:
|
case GST_MESSAGE_DEVICE_REMOVED:
|
||||||
gst_message_parse_device_removed (msg, &device);
|
gst_message_parse_device_removed (msg, &device);
|
||||||
device_removed (device);
|
device_removed (device);
|
||||||
|
gst_object_unref (device);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_print ("%s message\n", GST_MESSAGE_TYPE_NAME (msg));
|
g_print ("%s message\n", GST_MESSAGE_TYPE_NAME (msg));
|
||||||
|
|
Loading…
Reference in a new issue