diff options
author | phintuka <phintuka> | 2006-08-16 17:45:40 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2006-08-16 17:45:40 +0000 |
commit | a174de29ba38cd8215794d697fab906215ca13aa (patch) | |
tree | e1d40794e8e5faf4a5deaa95f9a26ee986533a38 | |
parent | bb14d84545db30828f1098eb1ee682160faaeb7e (diff) | |
download | xineliboutput-a174de29ba38cd8215794d697fab906215ca13aa.tar.gz xineliboutput-a174de29ba38cd8215794d697fab906215ca13aa.tar.bz2 |
More PlayFile fixes
-rw-r--r-- | device.c | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -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 |