Skip to content

Commit

Permalink
Psmf: Ignore last timestamp with old PsmfPlayer libs
Browse files Browse the repository at this point in the history
Until 5.50
Fix #6574
  • Loading branch information
sum2012 committed Aug 15, 2016
1 parent f233915 commit 00a379e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Core/HLE/scePsmf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,14 @@ class PsmfPlayer {
}

bool HasReachedEnd() {
bool videoPtsEnd = (s64)psmfPlayerAvcAu.pts >= (s64)totalDurationTimestamp - VIDEO_FRAME_DURATION_TS;
// If we're out of video data and have no audio, it's over even if the pts isn't there yet.
return videoPtsEnd || (mediaengine->IsVideoEnd() && mediaengine->IsNoAudioData());
if (psmfPlayerLibVersion >= 0x05050010) {
bool videoPtsEnd = (s64)psmfPlayerAvcAu.pts >= (s64)totalDurationTimestamp - VIDEO_FRAME_DURATION_TS;
// If we're out of video data and have no audio, it's over even if the pts isn't there yet.
return videoPtsEnd || (mediaengine->IsVideoEnd() && mediaengine->IsNoAudioData());
}
else {// Older versions just read until the end of the file.
return (mediaengine->IsVideoEnd() && mediaengine->IsNoAudioData());
}
}

u32 filehandle;
Expand Down

0 comments on commit 00a379e

Please sign in to comment.