Make !USE_FFMPEG savestates compatible.

This commit is contained in:
Sacha 2013-11-12 18:06:43 +10:00
parent efad755ccc
commit 3e762f2864
2 changed files with 5 additions and 2 deletions

View File

@ -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
}

View File

@ -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 <QGLWidget>