summaryrefslogtreecommitdiff
path: root/gst/imagefreeze
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis@debethencourt.com>2015-07-07 15:54:41 +0100
committerLuis de Bethencourt <luis@debethencourt.com>2015-07-07 15:57:19 +0100
commit55175561f6d916595cae70f614a529c8086c4b51 (patch)
tree3a1277949cd0615ebf58d6b86ad2067ca52e674f /gst/imagefreeze
parentf0c6b728f8fd1131480b3fe6a86d1bb8ae6f52d3 (diff)
downloadgstreamer-plugins-good-55175561f6d916595cae70f614a529c8086c4b51.tar.gz
Revert "imagefreeze: Remove impossible error condition"
This reverts commit d46631c5c7312ad613397f8238c7a9714ae3ae94. pad only handle EOS events but not EOS flow, and will push the buffer again resulting in an assertion error. So we should not handle the buffer and return EOS flow.
Diffstat (limited to 'gst/imagefreeze')
-rw-r--r--gst/imagefreeze/gstimagefreeze.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/imagefreeze/gstimagefreeze.c b/gst/imagefreeze/gstimagefreeze.c
index 43d495478..3c617cee1 100644
--- a/gst/imagefreeze/gstimagefreeze.c
+++ b/gst/imagefreeze/gstimagefreeze.c
@@ -676,9 +676,14 @@ gst_image_freeze_sink_chain (GstPad * pad, GstObject * parent,
{
GstImageFreeze *self = GST_IMAGE_FREEZE (parent);
- g_return_val_if_fail (self->buffer == NULL, GST_FLOW_ERROR);
-
g_mutex_lock (&self->lock);
+ if (self->buffer) {
+ GST_DEBUG_OBJECT (pad, "Already have a buffer, dropping");
+ gst_buffer_unref (buffer);
+ g_mutex_unlock (&self->lock);
+ return GST_FLOW_EOS;
+ }
+
self->buffer = buffer;
gst_pad_start_task (self->srcpad, (GstTaskFunction) gst_image_freeze_src_loop,