[Gstreamer-openmax] [PATCH] Fix for problem flushing the outport buffers
Rob Clark
rob at ti.com
Tue Nov 3 18:27:15 PST 2009
Not properly flushing output port buffers was causing a problem with seek. We would get a buffer from before the flush-start/flush-stop/newsegment sequence, which had an old timestamp, throwing off the AV sync logic in gst base sink classes.
Signed-off-by: Rob Clark <rob at ti.com>
---
omx/gstomx_util.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/omx/gstomx_util.c b/omx/gstomx_util.c
index 2bd25b4..ea97918 100644
--- a/omx/gstomx_util.c
+++ b/omx/gstomx_util.c
@@ -709,6 +709,9 @@ g_omx_port_flush (GOmxPort *port)
{
if (port->type == GOMX_PORT_OUTPUT)
{
+ /* This will get rid of any buffers that we have received, but not
+ * yet processed in the output_loop.
+ */
OMX_BUFFERHEADERTYPE *omx_buffer;
while ((omx_buffer = async_queue_pop_forced (port->queue)))
{
@@ -716,11 +719,9 @@ g_omx_port_flush (GOmxPort *port)
g_omx_port_release_buffer (port, omx_buffer);
}
}
- else
- {
- OMX_SendCommand (port->core->omx_handle, OMX_CommandFlush, port->port_index, NULL);
- g_sem_down (port->core->flush_sem);
- }
+
+ OMX_SendCommand (port->core->omx_handle, OMX_CommandFlush, port->port_index, NULL);
+ g_sem_down (port->core->flush_sem);
}
void
--
1.6.3.2
More information about the Gstreamer-openmax
mailing list