Skip to content

Commit

Permalink
AE: Pulse Audio fix crash on player stop.
Browse files Browse the repository at this point in the history
PA is calling back functions on stream destruction and may try
to read a free'd stream variable. (trac bug 13903)

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
  • Loading branch information
mooninite authored and davilla committed Apr 12, 2013
1 parent ed4d224 commit f16cd68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xbmc/cores/AudioEngine/Engines/PulseAE/PulseAEStream.cpp
Expand Up @@ -252,6 +252,10 @@ void CPulseAEStream::Destroy()

if (m_Stream)
{
pa_stream_set_state_callback(m_Stream, NULL, NULL);
pa_stream_set_write_callback(m_Stream, NULL, NULL);
pa_stream_set_latency_update_callback(m_Stream, NULL, NULL);
pa_stream_set_underflow_callback(m_Stream, NULL, NULL);
pa_stream_disconnect(m_Stream);
pa_stream_unref(m_Stream);
m_Stream = NULL;
Expand Down

0 comments on commit f16cd68

Please sign in to comment.