From 71b20faaebe29552b368aeebaf48dbc6311609ef Mon Sep 17 00:00:00 2001 From: phintuka Date: Wed, 16 Aug 2006 13:18:42 +0000 Subject: Fixed EndOfStreamReached when there is local frontend and remote frontend server without clients ePlayMode GetPlayMode(void) added If playMode is pmAudioOnlyBlack, video is discarded --- device.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'device.c') diff --git a/device.c b/device.c index 482cacfb..41f619cd 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.7 2006-08-07 18:20:43 phintuka Exp $ + * $Id: device.c,v 1.8 2006-08-16 13:18:42 phintuka Exp $ * */ @@ -615,8 +615,17 @@ 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) @@ -721,6 +730,9 @@ int cXinelibDevice::PlayVideo(const uchar *buf, int length) { TRACEF("cXinelibDevice::PlayVideo"); + if(playMode == pmAudioOnlyBlack) + return length; + if(m_RadioStream) { m_RadioStream = false; m_AudioCount = 0; -- cgit v1.2.3