<HTML><HEAD><TITLE>Samsung Enterprise Portal mySingle</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE id=mysingle_style>P {
        MARGIN-TOP: 5px; FONT-FAMILY: Times New Roman, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
TD {
        MARGIN-TOP: 5px; FONT-FAMILY: Times New Roman, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
LI {
        MARGIN-TOP: 5px; FONT-FAMILY: Times New Roman, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
BODY {
        FONT-FAMILY: Times New Roman, arial; FONT-SIZE: 9pt
}
</STYLE>
<META name=GENERATOR content=ActiveSquare></HEAD>
<BODY>
<P>From 794a96ffdbb7c1a4451ff0e0e14a7e2fad337c45 Mon Sep 17 00:00:00 2001<BR>From: mickey <<A href="mailto:mickey@avatar.(none">mickey@avatar.(none</A>)><BR>Date: Mon, 30 Aug 2010 15:44:00 +0900<BR>Subject: [PATCH] [gst-openmax] Fix repeate mode issue of totem player</P>
<P>When totem play single file in playlist in repeat mode, single file is played for 2times.<BR>Totem stops at third time, only plays when seek button is pressed.<BR>When totem player detects EOS (end of stream) in repeat mode, it doesn't change the statete.<BR>gst-openmax, libomx source code are implemented without consideration of this case.<BR>The repeate mode without state change causes a buffer loss in gst-openmax queue for one repeatation.</P>
<P>Singed-off-by: Mickey Kim <<A href="mailto:jihun.kim@samsung.com">jihun.kim@samsung.com</A>><BR>---<BR> omx/gstomx_base_filter.c | 1 +<BR> omx/gstomx_util.c | 13 +++++++++++--<BR> 2 files changed, 12 insertions(+), 2 deletions(-)</P>
<P>diff --git a/omx/gstomx_base_filter.c b/omx/gstomx_base_filter.c<BR>index a16cb5f..40d4c4c 100644<BR>--- a/omx/gstomx_base_filter.c<BR>+++ b/omx/gstomx_base_filter.c<BR>@@ -504,6 +504,7 @@ output_loop (gpointer data)<BR> GST_DEBUG_OBJECT (self, "got eos");<BR> gst_pad_push_event (self->srcpad, gst_event_new_eos ());<BR> ret = GST_FLOW_UNEXPECTED;<BR>+ g_omx_port_push_buffer (out_port, omx_buffer);<BR> goto leave;<BR> }<BR> <BR>diff --git a/omx/gstomx_util.c b/omx/gstomx_util.c<BR>index 283c32d..ce226e0 100644<BR>--- a/omx/gstomx_util.c<BR>+++ b/omx/gstomx_util.c<BR>@@ -697,8 +697,17 @@ g_omx_port_flush (GOmxPort *port)<BR> OMX_BUFFERHEADERTYPE *omx_buffer;<BR> while ((omx_buffer = async_queue_pop_forced (port->queue)))<BR> {<BR>- omx_buffer->nFilledLen = 0;<BR>- g_omx_port_release_buffer (port, omx_buffer);<BR>+ if (omx_buffer->nFlags & OMX_BUFFERFLAG_EOS)<BR>+ {<BR>+ omx_buffer->nFlags = 0;<BR>+ g_omx_port_push_buffer (port, omx_buffer);<BR>+ break;<BR>+ }<BR>+ else<BR>+ {<BR>+ omx_buffer->nFilledLen = 0;<BR>+ g_omx_port_release_buffer (port, omx_buffer);<BR>+ }<BR> }<BR> }<BR> else<BR>-- <BR>1.7.0.4</P>
<P><BR><BR> </P>
<P></P></BODY></HTML>