summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-01-26 16:48:42 +0000
committerphintuka <phintuka>2007-01-26 16:48:42 +0000
commit137897018f2c856c635d23cc6434cd44798df00b (patch)
treee53480532faf14249a17bc07150e36596d7de8d1
parent943b7e57e992461b798641e5ab628cf0a36765f2 (diff)
downloadxineliboutput-137897018f2c856c635d23cc6434cd44798df00b.tar.gz
xineliboutput-137897018f2c856c635d23cc6434cd44798df00b.tar.bz2
Do not sleep while holding frontend lock
-rw-r--r--frontend_local.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/frontend_local.c b/frontend_local.c
index 3575f4d7..83996913 100644
--- a/frontend_local.c
+++ b/frontend_local.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend_local.c,v 1.17 2007-01-24 07:17:31 phintuka Exp $
+ * $Id: frontend_local.c,v 1.18 2007-01-26 16:48:42 phintuka Exp $
*
*/
@@ -75,7 +75,7 @@ void cXinelibLocal::Stop(void)
SetStopSignal();
- if(1) {
+ {
LOCK_FE;
m_bReady = false;
if(fe)
@@ -92,20 +92,22 @@ void cXinelibLocal::Stop(void)
int cXinelibLocal::Play_PES(const uchar *data, int len)
{
TRACEF("cXinelibLocal::Play_PES");
- LOCK_FE;
- if(fe) {
- int done = m_bReady ? fe->xine_queue_pes_packet(fe, (char*)data, len) : 0;
- if(done>0) {
- Lock();
- m_StreamPos += done;
- Unlock();
- } else {
- cCondWait::SleepMs(5);
+
+ {
+ LOCK_FE;
+ if(fe && m_bReady) {
+ int done = fe->xine_queue_pes_packet(fe, (char*)data, len);
+ if(done>0) {
+ Lock();
+ m_StreamPos += done;
+ Unlock();
+ return done;
+ }
}
- return done;
}
- return 0;
+ //cCondWait::SleepMs(5);
+ return len;
}
void cXinelibLocal::OsdCmd(void *cmd)