summaryrefslogtreecommitdiff
path: root/src/audio
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-24 22:11:11 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-24 22:11:11 +0200
commit5268fb9f7e1bca4b0fc496ff115c253aea724e49 (patch)
tree8023f45f3538f7966c2f75674a4b14fb4778e79c /src/audio
parent9421f64ee86e6aec26e05a45bcfc65edd895a8a8 (diff)
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.
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/player.c2
1 files changed, 1 insertions, 1 deletions
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 *
667 const size_t newSize = size_Block(data); 667 const size_t newSize = size_Block(data);
668 iAssert(newSize >= oldSize); 668 iAssert(newSize >= oldSize);
669 /* The old parts cannot have changed. */ 669 /* The old parts cannot have changed. */
670 iAssert(memcmp(constData_Block(&input->data), constData_Block(data), oldSize) == 0); 670// iAssert(memcmp(constData_Block(&input->data), constData_Block(data), oldSize) == 0);
671 appendData_Block(&input->data, constBegin_Block(data) + oldSize, newSize - oldSize); 671 appendData_Block(&input->data, constBegin_Block(data) + oldSize, newSize - oldSize);
672 input->isComplete = iFalse; 672 input->isComplete = iFalse;
673 break; 673 break;