<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 &lt;<A href="mailto:mickey@avatar.(none">mickey@avatar.(none</A>)&gt;<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 &lt;<A href="mailto:jihun.kim@samsung.com">jihun.kim@samsung.com</A>&gt;<BR>---<BR>&nbsp;omx/gstomx_base_filter.c |&nbsp;&nbsp;&nbsp; 1 +<BR>&nbsp;omx/gstomx_util.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; 13 +++++++++++--<BR>&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GST_DEBUG_OBJECT (self, "got eos");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_pad_push_event (self-&gt;srcpad, gst_event_new_eos ());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ret = GST_FLOW_UNEXPECTED;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_omx_port_push_buffer (out_port, omx_buffer);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; goto leave;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OMX_BUFFERHEADERTYPE *omx_buffer;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while ((omx_buffer = async_queue_pop_forced (port-&gt;queue)))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; omx_buffer-&g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