imagefreeze: pass along eos if received before buffer arrives
authorDavid Hoyt <dhoyt@llnl.gov>
Mon, 6 Dec 2010 14:21:53 +0000 (15:21 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 6 Dec 2010 14:23:00 +0000 (15:23 +0100)
Fixes #636172.

gst/imagefreeze/gstimagefreeze.c

index b68286e..d6a3a9c 100644 (file)
@@ -553,6 +553,13 @@ gst_image_freeze_sink_event (GstPad * pad, GstEvent * event)
 
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_EOS:
+      if (!self->buffer) {
+        /* if we receive EOS before a buffer arrives, then let it pass */
+        GST_DEBUG_OBJECT (self, "EOS without input buffer, passing on");
+        ret = gst_pad_push_event (self->srcpad, event);
+        break;
+      }
+      /* fall-through */
     case GST_EVENT_NEWSEGMENT:
       GST_DEBUG_OBJECT (pad, "Dropping event");
       gst_event_unref (event);