From 5268fb9f7e1bca4b0fc496ff115c253aea724e49 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 24 Nov 2020 22:11:11 +0200 Subject: Fixed threading issues and data races The most serious problem was that GmRequest's response body was being accessed while the TlsRequest thread was modifying it. Now the response must always be locked before accessing elsewhere. There were also inefficient data updates in the media players. --- src/audio/player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/audio') diff --git a/src/audio/player.c b/src/audio/player.c index 77c23104..1c8538b4 100644 --- a/src/audio/player.c +++ b/src/audio/player.c @@ -667,7 +667,7 @@ void updateSourceData_Player(iPlayer *d, const iString *mimeType, const iBlock * const size_t newSize = size_Block(data); iAssert(newSize >= oldSize); /* The old parts cannot have changed. */ - iAssert(memcmp(constData_Block(&input->data), constData_Block(data), oldSize) == 0); +// iAssert(memcmp(constData_Block(&input->data), constData_Block(data), oldSize) == 0); appendData_Block(&input->data, constBegin_Block(data) + oldSize, newSize - oldSize); input->isComplete = iFalse; break; -- cgit v1.2.3