Skip to content

Commit

Permalink
LinuxRendererGL/LinuxRendererGLES: Use av_malloc for sws_scale intera…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
fritsch authored and Kwiboo committed Nov 17, 2016
1 parent eb64f8b commit f36738a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ CLinuxRendererGL::~CLinuxRendererGL()
}
else
{
delete [] m_rgbBuffer;
av_free(m_rgbBuffer);
m_rgbBuffer = NULL;
}

Expand Down Expand Up @@ -1010,7 +1010,7 @@ void CLinuxRendererGL::UnInit()
}
else
{
delete [] m_rgbBuffer;
av_free(m_rgbBuffer);
m_rgbBuffer = NULL;
}
m_rgbBufferSize = 0;
Expand Down Expand Up @@ -2594,7 +2594,7 @@ void CLinuxRendererGL::SetupRGBBuffer()
m_rgbBufferSize = m_sourceWidth * m_sourceHeight * 4;

if (!m_rgbPbo)
delete [] m_rgbBuffer;
av_free(m_rgbBuffer);

if (m_pboSupported)
{
Expand Down Expand Up @@ -2623,7 +2623,7 @@ void CLinuxRendererGL::SetupRGBBuffer()
}

if (!m_rgbPbo)
m_rgbBuffer = new BYTE[m_rgbBufferSize];
m_rgbBuffer = (BYTE*) av_malloc(m_rgbBufferSize);
}

bool CLinuxRendererGL::UploadRGBTexture(int source)
Expand Down
8 changes: 4 additions & 4 deletions xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ CLinuxRendererGLES::~CLinuxRendererGLES()
UnInit();

if (m_rgbBuffer != NULL) {
delete [] m_rgbBuffer;
av_free(m_rgbBuffer);
m_rgbBuffer = NULL;
}

Expand Down Expand Up @@ -765,7 +765,7 @@ void CLinuxRendererGLES::UnInit()

if (m_rgbBuffer != NULL)
{
delete [] m_rgbBuffer;
av_free(m_rgbBuffer);
m_rgbBuffer = NULL;
}
m_rgbBufferSize = 0;
Expand Down Expand Up @@ -1461,9 +1461,9 @@ void CLinuxRendererGLES::UploadYV12Texture(int source)
{
if(m_rgbBufferSize < m_sourceWidth * m_sourceHeight * 4)
{
delete [] m_rgbBuffer;
av_free(m_rgbBuffer);
m_rgbBufferSize = m_sourceWidth*m_sourceHeight*4;
m_rgbBuffer = new BYTE[m_rgbBufferSize];
m_rgbBuffer = (BYTE*) av_malloc(m_rgbBufferSize);
}

#if defined(__ARM_NEON__)
Expand Down

0 comments on commit f36738a

Please sign in to comment.