mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix a case where a pointer was being used before its null check in MediaEngine.cpp
This commit is contained in:
parent
2d25cc60c8
commit
ee164a3977
1 changed files with 3 additions and 2 deletions
|
@ -376,13 +376,14 @@ bool MediaEngine::stepVideo(int videoPixelMode) {
|
|||
return false;
|
||||
if (!m_pCodecCtx)
|
||||
return false;
|
||||
if ((!m_pFrame)||(!m_pFrameRGB))
|
||||
return false;
|
||||
|
||||
updateSwsFormat(videoPixelMode);
|
||||
// TODO: Technically we could set this to frameWidth instead of m_desWidth for better perf.
|
||||
// Update the linesize for the new format too. We started with the largest size, so it should fit.
|
||||
m_pFrameRGB->linesize[0] = getPixelFormatBytes(videoPixelMode) * m_desWidth;
|
||||
|
||||
if ((!m_pFrame)||(!m_pFrameRGB))
|
||||
return false;
|
||||
AVPacket packet;
|
||||
int frameFinished;
|
||||
bool bGetFrame = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue