Skip to content

Commit

Permalink
revert buffer allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
kumama committed Jul 1, 2016
1 parent 0267c95 commit be9e90b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions OMXAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,7 @@ bool COMXAudio::Initialize(OMXClock *clock, const OMXAudioConfig &config, uint64
// should be big enough that common formats (e.g. 6 channel DTS) fit in a single packet.
// we don't mind less common formats being split (e.g. ape/wma output large frames)
// 6 channel 32bpp float to 8 channel 16bpp in, so a full 48K input buffer will fit the output buffer
// m_ChunkLen = AUDIO_DECODE_OUTPUT_BUFFER * (m_InputChannels * m_BitsPerSample) >> (rounded_up_channels_shift[m_InputChannels] + 4);
m_ChunkLen = AUDIO_DECODE_OUTPUT_BUFFER * (6 * m_BitsPerSample) >> (rounded_up_channels_shift[6] + 4);
m_ChunkLen = AUDIO_DECODE_OUTPUT_BUFFER * (m_InputChannels * m_BitsPerSample) >> (rounded_up_channels_shift[m_InputChannels] + 4);

m_wave_header.Samples.wSamplesPerBlock = 0;
m_wave_header.Format.nChannels = m_InputChannels;
Expand Down Expand Up @@ -691,8 +690,6 @@ bool COMXAudio::ChangeInputFormat(const CStdString& device, int iChannels, uint6
CSingleLock lock (m_critSection);
OMX_ERRORTYPE omx_err;

layout = PCM_LAYOUT_2_0;

m_InputChannels = iChannels;

if(m_InputChannels == 0)
Expand Down

0 comments on commit be9e90b

Please sign in to comment.