Skip to content
Permalink
Browse files

Fix used input and output buffer sizes inside CActiveAEDSPProcess::Pr…

…ocess(...)
  • Loading branch information...
AchimTuran authored and popcornmix committed Jun 11, 2016
1 parent e0d8ccc commit 9e203c91b5203e7030b268259b80e09fa1000a2f
Showing with 2 additions and 2 deletions.
  1. +2 −2 xbmc/cores/AudioEngine/DSPAddons/ActiveAEDSPProcess.cpp
@@ -1275,7 +1275,7 @@ bool CActiveAEDSPProcess::Process(CSampleBuffer *in, CSampleBuffer *out)
/**
* Convert to required planar float format inside dsp system
*/
if (swr_convert(m_convertInput, (uint8_t **)m_ffMpegConvertArray[0], m_processArraySize, (const uint8_t **)in->pkt->data , frames) < 0)
if (swr_convert(m_convertInput, (uint8_t **)m_ffMpegConvertArray[0], m_processArraySize, (const uint8_t **)in->pkt->data, in->pkt->nb_samples) < 0)
{
CLog::Log(LOGERROR, "ActiveAE DSP - %s - input audio convert failed", __FUNCTION__);
return false;
@@ -1428,7 +1428,7 @@ bool CActiveAEDSPProcess::Process(CSampleBuffer *in, CSampleBuffer *out)
/**
* Convert back to required output format
*/
if (swr_convert(m_convertOutput, (uint8_t **)out->pkt->data, m_processArraySize, (const uint8_t **)m_ffMpegConvertArray[1], frames) < 0)
if (swr_convert(m_convertOutput, (uint8_t **)out->pkt->data, out->pkt->max_nb_samples, (const uint8_t **)m_ffMpegConvertArray[FFMPEG_PROC_ARRAY_OUT], frames) < 0)
{
CLog::Log(LOGERROR, "ActiveAE DSP - %s - output audio convert failed", __FUNCTION__);
return false;

0 comments on commit 9e203c9

Please sign in to comment.
You can’t perform that action at this time.