audiosource: lock held during peak reading must be a write lock
We modify elements of the source object, not to mention the peakfiles on disk. This was a regression introduced when switching from Lock to RWLock, caused by a failure to recognize this as a case where a write lock was required. The presence of scoped_array<> as a member of AudioSource (peak_cache) is suspicious nevertheless, and we should establish that it serves a useful purpose.
This commit is contained in:
parent
b8ebdbc44a
commit
f06d04c174
@ -762,7 +762,7 @@ AudioSource::build_peaks_from_scratch ()
|
||||
{
|
||||
/* hold lock while building peaks */
|
||||
|
||||
ReaderLock lp (_lock);
|
||||
WriterLock lp (_lock);
|
||||
|
||||
if (prepare_for_peakfile_writes ()) {
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user