From 3e762f28642e9a204e746528ba536ffac5a31680 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 12 Nov 2013 18:06:43 +1000 Subject: [PATCH] Make !USE_FFMPEG savestates compatible. --- Core/HW/MediaEngine.cpp | 6 +++++- Qt/QtHost.h | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index dd09ea45b8..9a22125c2b 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -204,10 +204,12 @@ void MediaEngine::DoState(PointerWrap &p){ loadStream(m_mpegheader, 2048, m_ringbuffersize); #ifdef USE_FFMPEG u32 hasopencontext = m_pFormatCtx != NULL; +#else + u32 hasopencontext = false; +#endif p.Do(hasopencontext); if (hasopencontext && p.mode == p.MODE_READ) openContext(); -#endif if (m_pdata) m_pdata->DoState(p); if (m_demux) @@ -618,6 +620,8 @@ int MediaEngine::writeVideoImageWithRange(u8* buffer, int frameWidth, int videoP u8 *MediaEngine::getFrameImage() { #ifdef USE_FFMPEG return m_pFrameRGB->data[0]; +#else + return NULL; #endif } diff --git a/Qt/QtHost.h b/Qt/QtHost.h index 25905f66ff..0c33205a15 100644 --- a/Qt/QtHost.h +++ b/Qt/QtHost.h @@ -12,7 +12,6 @@ #include "gfx/texture.h" #include "input/input_state.h" #include "math/math_util.h" -#include "base/mutex.h" #include "math/lin/matrix4x4.h" #include