commit ca7190ee83e63c597af53a40147d89063901d3f2
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Tue Jan 13 18:37:30 2009 +0000
- Avoid deadlocks when PulseAudio disappears
gstpb-pulse-hang-bz556986.patch | 49 +++++++++++++++++++++++++++++++++++++++++
gstreamer-plugins-base.spec | 8 ++++++-
2 files changed, 56 insertions(+), 1 deletion(-)
---
diff --git a/gstpb-pulse-hang-bz556986.patch b/gstpb-pulse-hang-bz556986.patch
new file mode 100644
index 0000000..9b8c028
--- /dev/null
+++ b/gstpb-pulse-hang-bz556986.patch
@@ -0,0 +1,49 @@
+--- gst-libs/gst/audio/gstbaseaudiosink.c 2008/12/20 12:45:03 1.113
++++ gst-libs/gst/audio/gstbaseaudiosink.c 2009/01/05 17:13:13 1.114
+@@ -1710,18 +1710,6 @@
+ }
+
+ static GstStateChangeReturn
+-gst_base_audio_sink_do_play (GstBaseAudioSink * sink)
+-{
+- GstStateChangeReturn ret;
+-
+- GST_OBJECT_LOCK (sink);
+- ret = gst_base_audio_sink_async_play (GST_BASE_SINK_CAST (sink));
+- GST_OBJECT_UNLOCK (sink);
+-
+- return ret;
+-}
+-
+-static GstStateChangeReturn
+ gst_base_audio_sink_change_state (GstElement * element,
+ GstStateChange transition)
+ {
+@@ -1745,15 +1733,23 @@
+ gst_ring_buffer_may_start (sink->ringbuffer, FALSE);
+ break;
+ case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
+- gst_base_audio_sink_do_play (sink);
++ GST_OBJECT_LOCK (sink);
++ GST_DEBUG_OBJECT (sink, "ringbuffer may start now");
++ sink->priv->sync_latency = TRUE;
++ GST_OBJECT_UNLOCK (sink);
++
++ gst_ring_buffer_may_start (sink->ringbuffer, TRUE);
++ if (GST_BASE_SINK_CAST (sink)->pad_mode == GST_ACTIVATE_PULL) {
++ /* we always start the ringbuffer in pull mode immediatly */
++ gst_ring_buffer_start (sink->ringbuffer);
++ }
+ break;
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
+- /* need to take the lock so we don't interfere with an
+- * async play */
+- GST_OBJECT_LOCK (sink);
+ /* ringbuffer cannot start anymore */
+ gst_ring_buffer_may_start (sink->ringbuffer, FALSE);
+ gst_ring_buffer_pause (sink->ringbuffer);
++
++ GST_OBJECT_LOCK (sink);
+ sink->priv->sync_latency = FALSE;
+ GST_OBJECT_UNLOCK (sink);
+ break;
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index f1517bc..2788c6b 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.21
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -15,6 +15,8 @@
Source:
http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: gstpb-0.10.15-cd-speed.patch
+#
http://bugzilla.gnome.org/show_bug.cgi?id=556986
+Patch1: gstpb-pulse-hang-bz556986.patch
Requires: %{gstreamer} >= %{_gst}
Requires: liboil >= 0.3.12-9
@@ -53,6 +55,7 @@ This package contains a set of well-maintained base plug-ins.
%prep
%setup -q -n gst-plugins-base-%{version}
%patch0 -p1 -b .cd-speed
+%patch1 -p0 -b .pulse-hang
%build
%configure \
@@ -238,6 +241,9 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Tue Jan 13 2009 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.2-4
+- Avoid deadlocks when PulseAudio disappears
+
* Thu Jan 1 2009 - Rex Dieter <rdieter(a)fedoraproject.org> - 0.10.2-3
- rebuild for pkgconfig deps (#478577)