mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 978647 - Properly handle EOF in DirectShow backend. r=edwin
This commit is contained in:
parent
cd18304a10
commit
1a2bf7e190
@ -1643,6 +1643,9 @@ public:
|
||||
|
||||
void BaseMediaResource::DispatchBytesConsumed(int64_t aNumBytes, int64_t aOffset)
|
||||
{
|
||||
if (aNumBytes <= 0) {
|
||||
return;
|
||||
}
|
||||
RefPtr<nsIRunnable> event(new DispatchBytesConsumedEvent(mDecoder, aNumBytes, aOffset));
|
||||
NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
|
||||
}
|
||||
|
@ -84,6 +84,11 @@ ParseMP3Headers(MP3FrameParser *aParser, MediaResource *aResource)
|
||||
MAX_READ_SIZE, &bytesRead);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (!bytesRead) {
|
||||
// End of stream.
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
aParser->Parse(buffer, bytesRead, offset);
|
||||
offset += bytesRead;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user