hrydgard/ppsspp — pull request #2207 by unknownbrackets (2013-06-11 06:23:44+00:00)
Title: Allow an mpeg to finish even not completely at stream end

When ffmpeg says there's nothing left, the video should be over. But as what I'm pretty sure is a safety check, we see if we're at or past the expected video size.

Patapon 3 was never reaching this, it was just a bit shy. It clearly had no more data to give either.

This conservatively allows the video to end if it's *near* the size by 2 packets, which fixes Patapon 3. Removing the check all together *could* cause a video to end early if the game allowed the ringbuffer to drain. But that might be right.. or more likely, sceMpeg probably doesn't have an end flag at all and just tries to decode every time.

-[Unknown]