forums.PPSSPP.org
super tiny patch for ffmpeg 3.2 and bug with wipeout pure in 1.4.2 and later - Printable Version

+- forums.PPSSPP.org (https://forums.ppsspp.org)
+-- Forum: PPSSPP - Playstation Portable Simulator Suitable for Playing Portably (/forumdisplay.php?fid=1)
+--- Forum: Development (/forumdisplay.php?fid=3)
+--- Thread: super tiny patch for ffmpeg 3.2 and bug with wipeout pure in 1.4.2 and later (/showthread.php?tid=23289)



super tiny patch for ffmpeg 3.2 and bug with wipeout pure in 1.4.2 and later - zelurker - 07-24-2017 07:29 PM

the patch is super tiny it's just about leaving avformat to make the streams detection instead of calling the SetupStreams function :
Code:
diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp
index ba57de7..444115a 100644
--- a/Core/HW/MediaEngine.cpp
+++ b/Core/HW/MediaEngine.cpp
@@ -303,13 +303,13 @@ bool MediaEngine::openContext(bool keepReadPos) {
        }
        av_dict_free(&open_opt);

-       if (!SetupStreams()) {
+       //if (!SetupStreams()) {
                // Fallback to old behavior.
                if (avformat_find_stream_info(m_pFormatCtx, NULL) < 0) {
                        closeContext();
                        return false;
                }
-       }
+       // }

        if (m_videoStream >= (int)m_pFormatCtx->nb_streams) {
                WARN_LOG_REPORT(ME, "Bad video stream %d", m_videoStream);
You are also supposed to convert the calls to avcodec_decode_video2 to avcodec_send_packet and avcodec_receive_frame, I did that on my end, but it's still optional, so no need to post that for now.

And there is a bug with wipeout pure in all versions >= 1.4, it hangs just before the profile selection screen with load or new game.
Works with version 1.3 so I reverted to 1.3.


RE: super tiny patch for ffmpeg 3.2 and bug with wipeout pure in 1.4.2 and later - GuilhermeGS2 - 07-25-2017 01:21 PM

I guess you should open a pull request in GitHub: https://github.com/hrydgard/ppsspp