summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2016-07-13 15:45:33 +0200
committerTim-Philipp Müller <tim@centricular.com>2016-07-15 12:58:53 +0100
commita3c47a0754bfaaa4ebec94d4ea9e397c923b1cba (patch)
treef56152e3e4ac801f84e952c66eaa26d6ecea8ffb /tools
parent54e4551cd884b6a6f98d18f4e95ae10ca75dbd89 (diff)
downloadgstreamer-plugins-base-a3c47a0754bfaaa4ebec94d4ea9e397c923b1cba.tar.gz
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
Diffstat (limited to 'tools')
-rw-r--r--tools/gst-device-monitor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gst-device-monitor.c b/tools/gst-device-monitor.c
index c0a8ec167..43a127f18 100644
--- a/tools/gst-device-monitor.c
+++ b/tools/gst-device-monitor.c
@@ -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));