Permalink
Browse files

Fix a segmentation fault in preview generation.

  • Loading branch information...
1 parent 4bc8f6f commit a635a7b288d8e14569707513995a5af06bb637e6 Doug Haber committed with Mark Kendall Dec 17, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 mythtv/libs/libmythtv/audioplayer.cpp
@@ -345,12 +345,14 @@ bool AudioPlayer::CanPassthrough(int samplerate, int channels)
void AudioPlayer::AddAudioData(char *buffer, int len, int64_t timecode)
{
- if (m_parent->PrepareAudioSample(timecode) && m_audioOutput &&
- !no_audio_out)
+ if (!m_audioOutput)
+ return;
+
+ if (m_parent->PrepareAudioSample(timecode) && !no_audio_out)
m_audioOutput->Drain();
int samplesize = m_audioOutput->GetBytesPerFrame();
- if ((samplesize <= 0) || !m_audioOutput)
+ if (samplesize <= 0)
return;
int frames = len / samplesize;

0 comments on commit a635a7b

Please sign in to comment.