diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2010-09-10 02:06:03 +0300 |
---|---|---|
committer | Felipe Contreras <felipe.contreras@gmail.com> | 2010-09-30 23:37:58 +0300 |
commit | 29c93cb9bee84119b1db91429bbe20af962cea0d (patch) | |
tree | 2aa3f5750084c058f2297ff66feb0f49c88dcfd5 | |
parent | e78aabdd32ed260a8cd9a5bad964c2422e81d6c0 (diff) |
base-filter: improve EOS handling
Tested-by: Mickey Kim <jihun.kim@samsung.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
-rw-r--r-- | omx/gstomx_base_filter.c | 16 |
1 files 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); |