Hello community,

here is the log from the commit of package gstreamer for openSUSE:Factory 
checked in at 2015-03-03 11:13:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gstreamer (Old)
 and      /work/SRC/openSUSE:Factory/.gstreamer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gstreamer"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gstreamer/gstreamer-doc.changes  2014-12-31 
11:22:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gstreamer.new/gstreamer-doc.changes     
2015-03-03 11:13:51.000000000 +0100
@@ -1,0 +2,5 @@
+Sun Mar  1 14:56:54 UTC 2015 - [email protected]
+
+- Run pre_checkin.sh to get in sync with gstreamer.
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/gstreamer/gstreamer.changes      2014-12-31 
11:22:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gstreamer.new/gstreamer.changes 2015-03-03 
11:13:51.000000000 +0100
@@ -1,0 +2,7 @@
+Sun Mar  1 14:56:54 UTC 2015 - [email protected]
+
+- Added gstreamer-message-delivery.patch
+  to fix async message delivery, see more at
+  http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=da7847
+
+-------------------------------------------------------------------

New:
----
  gstreamer-message-delivery.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gstreamer-doc.spec ++++++
--- /var/tmp/diff_new_pack.FruJPR/_old  2015-03-03 11:13:52.000000000 +0100
+++ /var/tmp/diff_new_pack.FruJPR/_new  2015-03-03 11:13:52.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gstreamer-doc
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -34,6 +34,9 @@
 Patch0:         gstreamer-no-gtk-doc-for-reals.patch
 # PATCH-FEATURE-UPSTREAM gstreamer-rpm-prov.patch bgo#588783 
[email protected] -- Add --rpm parameter to allow creation of rpm provides, 
patch from fedora
 Patch1:         gstreamer-rpm-prov.patch
+# http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=da7847d1adde
+# PATCH-FIX-UPSTREAM gstreamer-message-delivery.patch [email protected] 
-- to fix async message delivery
+Patch2:         gstreamer-message-delivery.patch
 BuildRequires:  bison
 BuildRequires:  check-devel
 BuildRequires:  fdupes
@@ -150,6 +153,7 @@
 %patch0 -p1
 %endif
 %patch1 -p1
+%patch2 -p1
 gnome-patch-translation-update po gstreamer-%{gst_branch}
 
 %build

++++++ gstreamer.spec ++++++
--- /var/tmp/diff_new_pack.FruJPR/_old  2015-03-03 11:13:52.000000000 +0100
+++ /var/tmp/diff_new_pack.FruJPR/_new  2015-03-03 11:13:52.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gstreamer
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -34,6 +34,9 @@
 Patch0:         gstreamer-no-gtk-doc-for-reals.patch
 # PATCH-FEATURE-UPSTREAM gstreamer-rpm-prov.patch bgo#588783 
[email protected] -- Add --rpm parameter to allow creation of rpm provides, 
patch from fedora
 Patch1:         gstreamer-rpm-prov.patch
+# http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=da7847d1adde
+# PATCH-FIX-UPSTREAM gstreamer-message-delivery.patch [email protected] 
-- to fix async message delivery
+Patch2:         gstreamer-message-delivery.patch
 BuildRequires:  bison
 BuildRequires:  check-devel
 BuildRequires:  fdupes
@@ -150,6 +153,7 @@
 %patch0 -p1
 %endif
 %patch1 -p1
+%patch2 -p1
 gnome-patch-translation-update po gstreamer-%{gst_branch}
 
 %build

++++++ gstreamer-message-delivery.patch ++++++
>From da7847d1adde088b4d8bcfc76642cf942e735dd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <[email protected]>
Date: Mon, 16 Feb 2015 22:39:42 +0000
Subject: message, bus: fix async message delivery

Async message delivery (where the posting thread gets blocked
until the message has been processed and/or freed) was pretty
much completely broken.

For one, don't use GMutex implementation details to check
whether a mutex has been initialized or not, esp. not
implementation details that don't hold true any more with
newer GLib versions where atomic ops and futexes are used
(spotted by Josep Torras). This led to async message
delivery no longer blocking with newer GLib versions on
Linux.

Secondly, after async delivery don't free mutex/GCond
embedded inside the just-freed message structure.

Use a new (private) mini object flag to signal GstMessage
that the message being freed is part of an async delivery
on the bus so that the dispose handler can keep the message
alive and the bus can free it once it's done cleaning up
stuff.

diff --git a/gst/gst_private.h b/gst/gst_private.h
index 8c9cb4b..d0aefb4 100644
--- a/gst/gst_private.h
+++ b/gst/gst_private.h
@@ -426,5 +426,8 @@ struct _GstDeviceProviderFactoryClass {
   gpointer _gst_reserved[GST_PADDING];
 };
 
+/* privat flag used by GstBus / GstMessage */
+#define GST_MESSAGE_FLAG_ASYNC_DELIVERY (GST_MINI_OBJECT_FLAG_LAST << 0)
+
 G_END_DECLS
 #endif /* __GST_PRIVATE_H__ */
diff --git a/gst/gstbus.c b/gst/gstbus.c
index ff458cd..13b0546 100644
--- a/gst/gstbus.c
+++ b/gst/gstbus.c
@@ -308,6 +308,10 @@ gst_bus_post (GstBus * bus, GstMessage * message)
   GST_DEBUG_OBJECT (bus, "[msg %p] posting on bus %" GST_PTR_FORMAT, message,
       message);
 
+  /* check we didn't accidentally add a public flag that maps to same value */
+  g_assert (!GST_MINI_OBJECT_FLAG_IS_SET (message,
+          GST_MESSAGE_FLAG_ASYNC_DELIVERY));
+
   GST_OBJECT_LOCK (bus);
   /* check if the bus is flushing */
   if (GST_OBJECT_FLAG_IS_SET (bus, GST_BUS_FLUSHING))
@@ -357,6 +361,8 @@ gst_bus_post (GstBus * bus, GstMessage * message)
       g_cond_init (cond);
       g_mutex_init (lock);
 
+      GST_MINI_OBJECT_FLAG_SET (message, GST_MESSAGE_FLAG_ASYNC_DELIVERY);
+
       GST_DEBUG_OBJECT (bus, "[msg %p] waiting for async delivery", message);
 
       /* now we lock the message mutex, send the message to the async
@@ -369,12 +375,18 @@ gst_bus_post (GstBus * bus, GstMessage * message)
 
       /* now block till the message is freed */
       g_cond_wait (cond, lock);
+
+      /* we acquired a new ref from gst_message_dispose() so we can clean up */
       g_mutex_unlock (lock);
 
       GST_DEBUG_OBJECT (bus, "[msg %p] delivered asynchronously", message);
 
+      GST_MINI_OBJECT_FLAG_UNSET (message, GST_MESSAGE_FLAG_ASYNC_DELIVERY);
+
       g_mutex_clear (lock);
       g_cond_clear (cond);
+
+      gst_message_unref (message);
       break;
     }
     default:
diff --git a/gst/gstmessage.c b/gst/gstmessage.c
index 8d3892c..9f4d286 100644
--- a/gst/gstmessage.c
+++ b/gst/gstmessage.c
@@ -166,6 +166,26 @@ gst_message_type_to_quark (GstMessageType type)
   return 0;
 }
 
+static gboolean
+_gst_message_dispose (GstMessage * message)
+{
+  gboolean do_free = TRUE;
+
+  if (GST_MINI_OBJECT_FLAG_IS_SET (message, GST_MESSAGE_FLAG_ASYNC_DELIVERY)) {
+    GST_INFO ("[msg %p] signalling async free", message);
+
+    GST_MESSAGE_LOCK (message);
+    GST_MESSAGE_SIGNAL (message);
+    GST_MESSAGE_UNLOCK (message);
+
+    /* don't free it yet, let bus finish with it first */
+    gst_message_ref (message);
+    do_free = FALSE;
+  }
+
+  return do_free;
+}
+
 static void
 _gst_message_free (GstMessage * message)
 {
@@ -181,12 +201,6 @@ _gst_message_free (GstMessage * message)
     GST_MESSAGE_SRC (message) = NULL;
   }
 
-  if (message->lock.p) {
-    GST_MESSAGE_LOCK (message);
-    GST_MESSAGE_SIGNAL (message);
-    GST_MESSAGE_UNLOCK (message);
-  }
-
   structure = GST_MESSAGE_STRUCTURE (message);
   if (structure) {
     gst_structure_set_parent_refcount (structure, NULL);
@@ -235,7 +249,8 @@ gst_message_init (GstMessageImpl * message, GstMessageType 
type,
     GstObject * src)
 {
   gst_mini_object_init (GST_MINI_OBJECT_CAST (message), 0, _gst_message_type,
-      (GstMiniObjectCopyFunction) _gst_message_copy, NULL,
+      (GstMiniObjectCopyFunction) _gst_message_copy,
+      (GstMiniObjectDisposeFunction) _gst_message_dispose,
       (GstMiniObjectFreeFunction) _gst_message_free);
 
   GST_MESSAGE_TYPE (message) = type;
-- 
cgit v0.10.2

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to