summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2006-08-16 17:45:40 +0000
committerphintuka <phintuka>2006-08-16 17:45:40 +0000
commita174de29ba38cd8215794d697fab906215ca13aa (patch)
treee1d40794e8e5faf4a5deaa95f9a26ee986533a38
parentbb14d84545db30828f1098eb1ee682160faaeb7e (diff)
downloadxineliboutput-a174de29ba38cd8215794d697fab906215ca13aa.tar.gz
xineliboutput-a174de29ba38cd8215794d697fab906215ca13aa.tar.bz2
More PlayFile fixes
-rw-r--r--device.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/device.c b/device.c
index 41f619cd..aa412af1 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c,v 1.8 2006-08-16 13:18:42 phintuka Exp $
+ * $Id: device.c,v 1.9 2006-08-16 17:45:40 phintuka Exp $
*
*/
@@ -615,17 +615,11 @@ int cXinelibDevice::PlayFileCtrl(const char *Cmd)
bool cXinelibDevice::EndOfStreamReached(void)
{
-#if 1
if(m_local && !m_local->EndOfStreamReached())
return false;
if(m_server && !m_server->EndOfStreamReached())
return false;
return true;
-#else
- // problem when local frontend and remote server with no clients
- return (((!m_server) || m_server->EndOfStreamReached()) &&
- ((!m_local) || m_local->EndOfStreamReached()));
-#endif
}
bool cXinelibDevice::PlayFile(const char *FileName, int Position, bool LoopPlay)
@@ -640,13 +634,15 @@ bool cXinelibDevice::PlayFile(const char *FileName, int Position, bool LoopPlay)
m_PlayingFile = true;
StopOutput();
}
- result = (((!m_server) ||
- m_server->PlayFile(FileName, Position, LoopPlay)) &&
- ((!m_local) ||
- m_local->PlayFile(FileName, Position, LoopPlay)));
+ if(m_server)
+ result = m_server->PlayFile(FileName, Position, LoopPlay);
+ if(m_local)
+ result = m_local->PlayFile(FileName, Position, LoopPlay);
} else if(/*!FileName &&*/m_PlayingFile) {
- result = (((!m_server) || m_server->PlayFile(NULL, 0)) &&
- ((!m_local) || m_local->PlayFile(NULL, 0)));
+ if(m_server)
+ result = m_server->PlayFile(NULL, 0);
+ if(m_local)
+ result = m_local->PlayFile(NULL, 0);
if(!m_liveMode)
SetReplayMode();
else