From 45775d4fc2d3e60805048eaaaf68e525a7866421 Mon Sep 17 00:00:00 2001 From: Sacha Date: Wed, 19 Jun 2013 01:14:14 +1000 Subject: [PATCH] Fix for non-ffmpeg platforms. Thanks unknownbrackets! Can now get past videos on platforms such as Meego and Symbian. Also fix some spacing and type issues. --- Common/ArmCPUDetect.cpp | 4 ++-- Core/HW/MediaEngine.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Common/ArmCPUDetect.cpp b/Common/ArmCPUDetect.cpp index 5d3a69669d..50ed3228bd 100644 --- a/Common/ArmCPUDetect.cpp +++ b/Common/ArmCPUDetect.cpp @@ -128,8 +128,8 @@ void CPUInfo::Detect() // Get the information about the CPU num_cores = GetCoreCount(); #if defined(__SYMBIAN32__) || defined(BLACKBERRY) || defined(IOS) -bool isVFP3 = false; -bool isVFP4 = false; + bool isVFP3 = false; + bool isVFP4 = false; #ifdef IOS isVFP3 = true; // TODO: Check for swift arch (VFP4) diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index 1b35a1f1dd..62eea7b2cc 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -369,13 +369,13 @@ void MediaEngine::updateSwsFormat(int videoPixelMode) { } bool MediaEngine::stepVideo(int videoPixelMode) { + // if video engine is broken, force to add timestamp + m_videopts += 3003; + if (!m_pFormatCtx) return false; if (!m_pCodecCtx) return false; - - // if video engine is broken, force to add timestamp - m_videopts += 3003; #ifdef USE_FFMPEG updateSwsFormat(videoPixelMode); // TODO: Technically we could set this to frameWidth instead of m_desWidth for better perf. @@ -525,7 +525,7 @@ int MediaEngine::writeVideoImage(u8* buffer, int frameWidth, int videoPixelMode) } return videoImageSize; #endif // USE_FFMPEG - return true; + return 0; } int MediaEngine::writeVideoImageWithRange(u8* buffer, int frameWidth, int videoPixelMode, @@ -590,7 +590,7 @@ int MediaEngine::writeVideoImageWithRange(u8* buffer, int frameWidth, int videoP } return videoImageSize; #endif // USE_FFMPEG - return true; + return 0; } static bool isHeader(u8* audioStream, int offset)