diff options
author | phintuka <phintuka> | 2008-07-15 08:07:25 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-07-15 08:07:25 +0000 |
commit | 28b0aab79f69b264a365bece430fb550e65e0577 (patch) | |
tree | 976bea1384f075cc8b8b80b5ad3178bc3940a521 | |
parent | 6d445da46f422e3358a2e3f9c745589845bef3ed (diff) | |
download | xineliboutput-28b0aab79f69b264a365bece430fb550e65e0577.tar.gz xineliboutput-28b0aab79f69b264a365bece430fb550e65e0577.tar.bz2 |
Fix infinite loop when trying to play only one unacessible or very short music file
-rw-r--r-- | media_player.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/media_player.c b/media_player.c index acc45b12..7e48278a 100644 --- a/media_player.c +++ b/media_player.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: media_player.c,v 1.57 2008-07-14 16:20:01 phintuka Exp $ + * $Id: media_player.c,v 1.58 2008-07-15 08:07:25 phintuka Exp $ * */ @@ -73,6 +73,7 @@ class cXinelibPlayer : public cPlayer bool NextFile(int step); bool Playing(void) { return !(m_Error || cXinelibDevice::Instance().EndOfStreamReached()); } + bool Error(void) { return m_Error; } void UseResumeFile(bool Val) { m_UseResumeFile = Val; } /* Playlist access */ @@ -582,7 +583,7 @@ eOSState cXinelibPlayerControl::ProcessKey(eKeys Key) { if ( !m_Player->Playing() ) { LOGDBG("cXinelibPlayerControl: EndOfStreamReached"); - if (m_Mode == ShowMusic && m_Player->Files() == 1) { + if (m_Mode == ShowMusic && m_Player->Files() == 1 && !m_Player->Error()) { m_Player->NextFile(0); return osContinue; } |