wtaymans pushed to clutter-gst2 (f22). "Add patch to flush video sink, fixes errors in cheese"
notifications at fedoraproject.org
notifications at fedoraproject.org
Tue May 19 14:19:09 UTC 2015
From 66ee186122864a675177581a49a2618aa934d313 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans at redhat.com>
Date: Tue, 19 May 2015 15:05:57 +0200
Subject: Add patch to flush video sink, fixes errors in cheese
diff --git a/0001-video-sink-clear-buffer-in-flush.patch b/0001-video-sink-clear-buffer-in-flush.patch
new file mode 100644
index 0000000..9230aab
--- /dev/null
+++ b/0001-video-sink-clear-buffer-in-flush.patch
@@ -0,0 +1,58 @@
+From 6dd67050554caf7e689a0de28807631b56d01b16 Mon Sep 17 00:00:00 2001
+From: Wim Taymans <wtaymans at redhat.com>
+Date: Tue, 19 May 2015 13:31:12 +0200
+Subject: [PATCH] video-sink: clear buffer in flush
+
+We need to release our refs to the buffer in FLUSH_START so that
+upstream can free and reuse the memory.
+---
+ clutter-gst/clutter-gst-video-sink.c | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
+index 63867d4..ef6d996 100644
+--- a/clutter-gst/clutter-gst-video-sink.c
++++ b/clutter-gst/clutter-gst-video-sink.c
+@@ -1971,6 +1971,31 @@ clutter_gst_video_sink_propose_allocation (GstBaseSink * base_sink, GstQuery * q
+ return TRUE;
+ }
+
++static gboolean
++clutter_gst_video_sink_event (GstBaseSink * basesink, GstEvent * event)
++{
++ ClutterGstVideoSink *sink = CLUTTER_GST_VIDEO_SINK (basesink);
++ ClutterGstVideoSinkPrivate *priv = sink->priv;
++ ClutterGstSource *gst_source = priv->source;
++
++ switch (GST_EVENT_TYPE (event)) {
++ case GST_EVENT_FLUSH_START:
++ g_mutex_lock (&gst_source->buffer_lock);
++ if (gst_source->buffer) {
++ GST_DEBUG ("Freeing existing buffer %p", gst_source->buffer);
++ gst_buffer_unref (gst_source->buffer);
++ gst_source->buffer = NULL;
++ }
++ g_mutex_unlock (&gst_source->buffer_lock);
++ break;
++
++ default:
++ break;
++ }
++
++ return GST_BASE_SINK_CLASS (parent_class)->event (basesink, event);
++}
++
+ static void
+ clutter_gst_video_sink_class_init (ClutterGstVideoSinkClass * klass)
+ {
+@@ -2007,6 +2032,7 @@ clutter_gst_video_sink_class_init (ClutterGstVideoSinkClass * klass)
+ gstbase_sink_class->set_caps = clutter_gst_video_sink_set_caps;
+ gstbase_sink_class->get_caps = clutter_gst_video_sink_get_caps;
+ gstbase_sink_class->propose_allocation = clutter_gst_video_sink_propose_allocation;
++ gstbase_sink_class->event = clutter_gst_video_sink_event;
+
+ /**
+ * ClutterGstVideoSink:texture:
+--
+2.1.0
+
diff --git a/clutter-gst2.spec b/clutter-gst2.spec
index 1bdbc44..6856ea0 100644
--- a/clutter-gst2.spec
+++ b/clutter-gst2.spec
@@ -1,11 +1,12 @@
Name: clutter-gst2
Version: 2.0.14
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GStreamer integration for Clutter
License: LGPLv2+
URL: http://www.clutter-project.org
Source0: http://ftp.gnome.org/pub/GNOME/sources/clutter-gst/2.0/clutter-gst-%{version}.tar.xz
+Patch1: 0001-video-sink-clear-buffer-in-flush.patch
BuildRequires: clutter-devel
BuildRequires: gobject-introspection-devel
@@ -33,6 +34,7 @@ developing applications that use clutter-gst API version 2.0.
%prep
%setup -q -n clutter-gst-%{version}
+%patch1 -p1
%build
%configure
@@ -64,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc/
#doc #{_datadir}/gtk-doc/
%changelog
+* Tue May 19 2015 Wim Taymans <wtaymans at redhat.com> - 2.0.14-2
+- Add patch to flush video sink, fixes errors in cheese
+
* Tue Feb 03 2015 Richard Hughes <rhughes at redhat.com> - 2.0.14-1
- Update to 2.0.14
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/clutter-gst2.git/commit/?h=f22&id=66ee186122864a675177581a49a2618aa934d313
More information about the scm-commits
mailing list