Psmf: Ignore last timestamp with old PsmfPlayer libs

Until 5.50
Fix #6574
This commit is contained in:
sum2012 2016-08-16 03:57:36 +08:00
parent f23391578f
commit 00a379e9f0

View file

@ -232,9 +232,14 @@ public:
}
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;