We return EOS after the first buffer, and GstPad will make sure now that we
won't get any other buffer afterwards until a flush happens. No need to check
for it ourselves.
https://bugzilla.gnome.org/show_bug.cgi?id=735581
{
GstImageFreeze *self = GST_IMAGE_FREEZE (parent);
- 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;
- }
+ g_return_val_if_fail (self->buffer == NULL, GST_FLOW_ERROR);
+ g_mutex_lock (&self->lock);
self->buffer = buffer;
gst_pad_start_task (self->srcpad, (GstTaskFunction) gst_image_freeze_src_loop,