NJ-1402 "multiple amazon streaming sample mp3 play at the same time"
There is no tabs to spaces because
1. make review actual change easier;
2. per google's request, such changes will be pushed to later.
diff --git a/engines/player/src/pv_player_engine.cpp b/engines/player/src/pv_player_engine.cpp
index 67b1d2b..0628766 100644
--- a/engines/player/src/pv_player_engine.cpp
+++ b/engines/player/src/pv_player_engine.cpp
@@ -9323,12 +9323,12 @@
}
else if (iState == PVP_ENGINE_STATE_AUTO_PAUSED)
{
- // Usecase for this scenario:
- // Prepare->Underflow->DataReady->Started
- // Change state to STARTED
+ // Change state back to PREPARED, since Underflow and Dataready cancel each other out.
+ // Wait for Start command from App to Start the clock and change state to STARTED.
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
- (0, "PVPlayerEngine::DoSourceDataReadyAutoResume: DataReady rcvd, Prepare->Underflow->DataReady->Started, datapaths already started"));
- SetEngineState(PVP_ENGINE_STATE_STARTED);
+ (0, "PVPlayerEngine::DoSourceDataReadyAutoResume: DataReady rcvd in
+ PVP_ENGINE_STATE_AUTO_PAUSED state. Set state back to PREPARED."));
+ SetEngineState(PVP_ENGINE_STATE_PREPARED);
}
else
{
@@ -9359,7 +9359,7 @@
iWatchDogTimer->Start();
}
}
- else if (iNumPVMFInfoStartOfDataPending == 0)
+ else if ((iNumPVMFInfoStartOfDataPending == 0) && (iState == PVP_ENGINE_STATE_STARTED))
{
StartPlaybackClock();
@@ -14109,7 +14109,7 @@
{
// Can't adjust the skip time back so use the returned values to skip to
iSkipMediaDataTS = iActualMediaDataTS;
- iActualNPT = iTargetNPT;
+ iTargetNPT = iActualNPT;
iWatchDogTimerInterval = 0;
}
else