From df22d0609fc1a5106c7bb6c4e5f7d010d689636b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 25 May 2014 18:44:36 -0700 Subject: [PATCH] End the video when we run out of packets. If there are no audio or video packets left, even if we haven't hit the pts, the video is over. Fixes #6135, hanging in Chinese translation of Clannad. --- Core/HLE/scePsmf.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index ff21ccc9cb..21c3ea28a0 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -1395,7 +1395,8 @@ int scePsmfPlayerUpdate(u32 psmfPlayer) } DEBUG_LOG(ME, "scePsmfPlayerUpdate(%08x)", psmfPlayer); - if ((s64)psmfplayer->psmfPlayerAvcAu.pts >= (s64)psmfplayer->totalDurationTimestamp - VIDEO_FRAME_DURATION_TS) { + bool videoPtsEnd = (s64)psmfplayer->psmfPlayerAvcAu.pts >= (s64)psmfplayer->totalDurationTimestamp - VIDEO_FRAME_DURATION_TS; + if (videoPtsEnd || (psmfplayer->mediaengine->IsVideoEnd() && psmfplayer->mediaengine->IsNoAudioData())) { if (videoLoopStatus == PSMF_PLAYER_CONFIG_NO_LOOP && psmfplayer->videoStep >= 1) { if (psmfplayer->status != PSMF_PLAYER_STATUS_PLAYING_FINISHED) { psmfplayer->ScheduleFinish(psmfPlayer);