Permalink
Browse files

Remove a duplicate SendMythSystemPlayEvent("PLAY_STARTED") and ensure…

… we only send PLAY_STOPPED if we sent [PLAY/LIVETV]_STARTED. This means that neither STARTED or STOPPED are sent if playback fails. Indirectly fixes coverity 746793
  • Loading branch information...
stuartm committed Jun 10, 2013
1 parent d53cc11 commit 69d2f851d18c3685160c9fa43e4a84d885bc90df
Showing with 3 additions and 8 deletions.
  1. +3 −8 mythtv/libs/libmythtv/tv_play.cpp
@@ -353,12 +353,6 @@ bool TV::StartTV(ProgramInfo *tvrec, uint flags)
tv->SetLastProgram(&pginfo);
}
if (curProgram)
{
startSysEventSent = true;
SendMythSystemPlayEvent("PLAY_STARTED", curProgram);
}
// Notify others that we are about to play
gCoreContext->WantingPlayback(tv);
@@ -463,7 +457,8 @@ bool TV::StartTV(ProgramInfo *tvrec, uint flags)
if (curProgram)
{
SendMythSystemPlayEvent("PLAY_STOPPED", curProgram);
if (startSysEventSent)
SendMythSystemPlayEvent("PLAY_STOPPED", curProgram);
if (deleterecording)
{
@@ -483,7 +478,7 @@ bool TV::StartTV(ProgramInfo *tvrec, uint flags)
delete curProgram;
}
else
else if (startSysEventSent)
gCoreContext->SendSystemEvent("PLAY_STOPPED");
if (!playerError.isEmpty())

0 comments on commit 69d2f85

Please sign in to comment.