Ticket #5283: mythtv_initialtimerstretch.1.patch

File mythtv_initialtimerstretch.1.patch, 958 bytes (added by Mark Spieth, 16 years ago)
  • libs/libmyth/audiooutputbase.cpp

     
    121121void AudioOutputBase::SetStretchFactorLocked(float laudio_stretchfactor)
    122122{
    123123    effdspstretched = (int)((float)effdsp / laudio_stretchfactor);
    124     if (audio_stretchfactor != laudio_stretchfactor)
     124    if ((audio_stretchfactor != laudio_stretchfactor) ||
     125        (pSoundStretch == NULL))
    125126    {
    126127        audio_stretchfactor = laudio_stretchfactor;
    127128        if (pSoundStretch)
     
    374376
    375377    if (redo_stretch)
    376378    {
    377         float laudio_stretchfactor = audio_stretchfactor;
    378379        delete pSoundStretch;
    379380        pSoundStretch = NULL;
    380         audio_stretchfactor = 0.0f;
    381         SetStretchFactorLocked(laudio_stretchfactor);
     381        SetStretchFactorLocked(audio_stretchfactor);
    382382    }
    383383    else
    384384    {