Skip to content
Browse files

[AE/CA] - destroy the stream when needed

  • Loading branch information...
1 parent 2ed11b0 commit c972b60004785ce7d0e890f01a4bb107462d0000 @Memphiz committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.cpp
View
6 xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAEStream.cpp
@@ -197,13 +197,13 @@ CCoreAudioAEStream::CCoreAudioAEStream(enum AEDataFormat dataFormat, unsigned in
CCoreAudioAEStream::~CCoreAudioAEStream()
{
+ Destroy();
+
CloseConverter();
m_delete = true;
m_valid = false;
- InternalFlush();
-
_aligned_free(m_convertBuffer);
//_aligned_free(m_resampleBuffer);
_aligned_free(m_remapBuffer);
@@ -321,6 +321,7 @@ void CCoreAudioAEStream::Initialize()
if (!m_remap.Initialize(m_StreamFormat.m_channelLayout, m_OutputFormat.m_channelLayout, false))
{
m_valid = false;
+ Destroy();
return;
}
@@ -332,6 +333,7 @@ void CCoreAudioAEStream::Initialize()
if (!m_vizRemap.Initialize(m_OutputFormat.m_channelLayout, CAEChannelInfo(AE_CH_LAYOUT_2_0), false, true))
{
m_valid = false;
+ Destroy();
return;
}
}

0 comments on commit c972b60

Please sign in to comment.
Something went wrong with that request. Please try again.