pidgin/pidgin

Merge the last pr from the public tree
release-2.x.y
2016-06-18, Gary Kramlich
d5f8a3399782
Merge the last pr from the public tree
--- a/libpurple/media/backend-fs2.c Sat Jun 18 20:42:01 2016 -0500
+++ b/libpurple/media/backend-fs2.c Sat Jun 18 21:11:40 2016 -0500
@@ -533,6 +533,8 @@
purple_media_backend_fs2_class_init(PurpleMediaBackendFs2Class *klass)
{
GObjectClass *gobject_class = (GObjectClass*)klass;
+ GList *features;
+ GList *it;
gobject_class->dispose = purple_media_backend_fs2_dispose;
gobject_class->finalize = purple_media_backend_fs2_finalize;
@@ -544,6 +546,15 @@
g_object_class_override_property(gobject_class, PROP_MEDIA, "media");
g_type_class_add_private(klass, sizeof(PurpleMediaBackendFs2Private));
+
+ /* VA-API elements aren't well supported in Farstream. Ignore them. */
+ features = gst_registry_get_feature_list_by_plugin(gst_registry_get(),
+ "vaapi");
+ for (it = features; it; it = it->next) {
+ gst_plugin_feature_set_rank((GstPluginFeature *)it->data,
+ GST_RANK_NONE);
+ }
+ gst_plugin_feature_list_free(features);
}
static void
--- a/libpurple/mediamanager.c Sat Jun 18 20:42:01 2016 -0500
+++ b/libpurple/mediamanager.c Sat Jun 18 21:11:40 2016 -0500
@@ -491,14 +491,18 @@
#ifdef HAVE_MEDIA_APPLICATION
g_mutex_lock (&manager->priv->appdata_mutex);
- for (list = manager->priv->appdata_info; list; list = list->next) {
+ list = manager->priv->appdata_info;
+ while (list) {
PurpleMediaAppDataInfo *info = list->data;
+ GList *next = list->next;
if (info->media == media) {
manager->priv->appdata_info = g_list_delete_link (
manager->priv->appdata_info, list);
free_appdata_info_locked (info);
}
+
+ list = next;
}
g_mutex_unlock (&manager->priv->appdata_mutex);
#endif
@@ -558,9 +562,24 @@
static void
free_appdata_info_locked (PurpleMediaAppDataInfo *info)
{
+ GstAppSrcCallbacks null_src_cb = { NULL, NULL, NULL, { NULL } };
+ GstAppSinkCallbacks null_sink_cb = { NULL, NULL, NULL , { NULL } };
+
if (info->notify)
info->notify (info->user_data);
+ info->media = NULL;
+ if (info->appsrc) {
+ /* Will call appsrc_destroyed. */
+ gst_app_src_set_callbacks (info->appsrc, &null_src_cb,
+ NULL, NULL);
+ }
+ if (info->appsink) {
+ /* Will call appsink_destroyed. */
+ gst_app_sink_set_callbacks (info->appsink, &null_sink_cb,
+ NULL, NULL);
+ }
+
/* Make sure no other thread is using the structure */
g_free (info->session_id);
g_free (info->participant);
@@ -867,7 +886,14 @@
static void
appsrc_destroyed (PurpleMediaAppDataInfo *info)
{
- PurpleMediaManager *manager = purple_media_manager_get ();
+ PurpleMediaManager *manager;
+
+ if (!info->media) {
+ /* PurpleMediaAppDataInfo is being freed. Return at once. */
+ return;
+ }
+
+ manager = purple_media_manager_get ();
g_mutex_lock (&manager->priv->appdata_mutex);
info->appsrc = NULL;
@@ -1025,7 +1051,14 @@
static void
appsink_destroyed (PurpleMediaAppDataInfo *info)
{
- PurpleMediaManager *manager = purple_media_manager_get ();
+ PurpleMediaManager *manager;
+
+ if (!info->media) {
+ /* PurpleMediaAppDataInfo is being freed. Return at once. */
+ return;
+ }
+
+ manager = purple_media_manager_get ();
g_mutex_lock (&manager->priv->appdata_mutex);
info->appsink = NULL;
--- a/pidgin/gtkft.c Sat Jun 18 20:42:01 2016 -0500
+++ b/pidgin/gtkft.c Sat Jun 18 21:11:40 2016 -0500
@@ -504,7 +504,9 @@
}
else
{
- purple_notify_uri(NULL, filename);
+ gchar *uri = g_strdup_printf("file://%s", filename);
+ purple_notify_uri(NULL, uri);
+ g_free(uri);
return;
}