mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 874325 - Add lock to MediaStreamSource::readAt(). r=doublec
This commit is contained in:
parent
58cbdd692d
commit
1591798e76
@ -98,6 +98,7 @@ ssize_t MediaStreamSource::readAt(off64_t offset, void *data, size_t size)
|
||||
char *ptr = static_cast<char *>(data);
|
||||
size_t todo = size;
|
||||
while (todo > 0) {
|
||||
Mutex::Autolock autoLock(mLock);
|
||||
uint32_t bytesRead;
|
||||
if ((offset != mResource->Tell() &&
|
||||
NS_FAILED(mResource->Seek(nsISeekableStream::NS_SEEK_SET, offset))) ||
|
||||
|
@ -42,6 +42,7 @@ class MediaStreamSource : public DataSource {
|
||||
typedef mozilla::MediaResource MediaResource;
|
||||
typedef mozilla::AbstractMediaDecoder AbstractMediaDecoder;
|
||||
|
||||
Mutex mLock;
|
||||
nsRefPtr<MediaResource> mResource;
|
||||
AbstractMediaDecoder *mDecoder;
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user