From 69b9c76dc85062db9f6faa2e78eb39097d1a08e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 8 Feb 2010 08:11:33 +0100 Subject: [PATCH] [MOVED FROM BAD 21/29] shapewipe: Drop mask buffer on FLUSH events --- gst/shapewipe/gstshapewipe.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; } -- 2.7.4