From 29c93cb9bee84119b1db91429bbe20af962cea0d Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Fri, 10 Sep 2010 02:06:03 +0300 Subject: base-filter: improve EOS handling Tested-by: Mickey Kim Signed-off-by: Felipe Contreras --- omx/gstomx_base_filter.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/omx/gstomx_base_filter.c b/omx/gstomx_base_filter.c index a16cb5f..4581f16 100644 --- a/omx/gstomx_base_filter.c +++ b/omx/gstomx_base_filter.c @@ -499,14 +499,6 @@ output_loop (gpointer data) GST_WARNING_OBJECT (self, "empty buffer"); } - if (G_UNLIKELY (omx_buffer->nFlags & OMX_BUFFERFLAG_EOS)) - { - GST_DEBUG_OBJECT (self, "got eos"); - gst_pad_push_event (self->srcpad, gst_event_new_eos ()); - ret = GST_FLOW_UNEXPECTED; - goto leave; - } - if (self->share_output_buffer && !omx_buffer->pBuffer && omx_buffer->nOffset == 0) @@ -542,6 +534,14 @@ output_loop (gpointer data) GST_ERROR_OBJECT (self, "no input buffer to share"); } + if (G_UNLIKELY (omx_buffer->nFlags & OMX_BUFFERFLAG_EOS)) + { + GST_DEBUG_OBJECT (self, "got eos"); + gst_pad_push_event (self->srcpad, gst_event_new_eos ()); + omx_buffer->nFlags &= ~OMX_BUFFERFLAG_EOS; + ret = GST_FLOW_UNEXPECTED; + } + omx_buffer->nFilledLen = 0; GST_LOG_OBJECT (self, "release_buffer"); g_omx_port_release_buffer (out_port, omx_buffer); -- cgit v1.2.3