From a56b3d5eac05d0f51757d510553ad2d23b60235b Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 25 Mar 2017 14:57:24 +0100 Subject: Fix crash on multiple stop/start command due to invalid pointer returned to the engine from the diskstreamer. --- src/audiocache.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/audiocache.cc') diff --git a/src/audiocache.cc b/src/audiocache.cc index a5fb0db..a366423 100644 --- a/src/audiocache.cc +++ b/src/audiocache.cc @@ -168,7 +168,6 @@ sample_t* AudioCache::next(cacheid_t id, size_t& size) } c.localpos += framesize; - return s; } @@ -255,10 +254,11 @@ void AudioCache::setFrameSize(size_t framesize) // NOTE: Not threaded... //std::lock_guard id_manager_lock(id_manager); - if(framesize > this->framesize) + if(framesize > nodata_framesize) { delete[] nodata; nodata = new sample_t[framesize]; + nodata_framesize = framesize; for(size_t i = 0; i < framesize; ++i) { -- cgit v1.2.3