[gst-cvs] gst-plugins-good: [MOVED FROM BAD 21/29] shapewipe: Drop mask buffer on FLUSH events

Sebastian Dröge slomo at kemper.freedesktop.org
Fri Feb 12 02:35:35 PST 2010


Module: gst-plugins-good
Branch: master
Commit: 69b9c76dc85062db9f6faa2e78eb39097d1a08e2
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=69b9c76dc85062db9f6faa2e78eb39097d1a08e2

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Mon Feb  8 08:11:33 2010 +0100

[MOVED FROM BAD 21/29] shapewipe: Drop mask buffer on FLUSH events

---

 gst/shapewipe/gstshapewipe.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/gst/shapewipe/gstshapewipe.c b/gst/shapewipe/gstshapewipe.c
index 99a783e..7c512df 100644
--- a/gst/shapewipe/gstshapewipe.c
+++ b/gst/shapewipe/gstshapewipe.c
@@ -1073,10 +1073,24 @@ gst_shape_wipe_video_sink_event (GstPad * pad, GstEvent * event)
 static gboolean
 gst_shape_wipe_mask_sink_event (GstPad * pad, GstEvent * event)
 {
+  GstShapeWipe *self = GST_SHAPE_WIPE (gst_pad_get_parent (pad));
+
   GST_DEBUG_OBJECT (pad, "Got %s event", GST_EVENT_TYPE_NAME (event));
 
+  switch (GST_EVENT_TYPE (event)) {
+    case GST_EVENT_FLUSH_STOP:
+      g_mutex_lock (self->mask_mutex);
+      gst_buffer_replace (&self->mask, NULL);
+      g_mutex_unlock (self->mask_mutex);
+      break;
+    default:
+      break;
+  }
+
   /* Dropping all events here */
   gst_event_unref (event);
+
+  gst_object_unref (self);
   return TRUE;
 }
 





More information about the Gstreamer-commits mailing list