Fix the media crash issue 21/24221/1
authorWu Zheng <wu.zheng@intel.com>
Wed, 9 Jul 2014 03:29:02 +0000 (11:29 +0800)
committerWu Zheng <wu.zheng@intel.com>
Wed, 9 Jul 2014 03:29:02 +0000 (11:29 +0800)
unregisterplay should be invoked by sync.
unregisterplay doesn't need to be done after invoked.

Change-Id: I24c228ecfada5226ea01fecc9c88a6cc548648f1
Signed-off-by: Wu Zheng <wu.zheng@intel.com>
src/media.c

index adef4ea..24a6540 100644 (file)
@@ -606,12 +606,10 @@ void bt_media_unregister_player(struct _bluez_adapter *adapter)
                return;
        }
 
-       g_dbus_proxy_call(adapter->media_proxy,
+       g_dbus_proxy_call_sync(adapter->media_proxy,
                        "UnregisterPlayer",
                        g_variant_new("(o)", BT_MEDIA_OBJECT_PATH),
-                       0, -1, NULL,
-                       handle_media_proxy_cb,
-                       adapter);
+                       0, -1, NULL, NULL);
 
        if (adapter->avrcp_registration_id)
                bt_unregister_avrcp_property(adapter,