mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1191813: [mp3] P1. Avoid false positive EOS detection. r=esawin
We do so by using blocking reads via the MediaSourceIndex::ReadAt convenience method.
This commit is contained in:
parent
45c74a8d98
commit
7d33fa6fc6
@ -345,7 +345,7 @@ MP3TrackDemuxer::GetEvictionOffset(TimeUnit aTime) {
|
||||
|
||||
int64_t
|
||||
MP3TrackDemuxer::StreamLength() const {
|
||||
return mSource->GetLength();
|
||||
return mSource.GetLength();
|
||||
}
|
||||
|
||||
TimeUnit
|
||||
@ -525,8 +525,8 @@ MP3TrackDemuxer::Read(uint8_t* aBuffer, int64_t aOffset, int32_t aSize) {
|
||||
|
||||
uint32_t read = 0;
|
||||
MP3DEMUXER_LOGV("MP3TrackDemuxer::Read -> ReadAt(%d)", aSize);
|
||||
const nsresult rv = mSource->ReadAt(aOffset, reinterpret_cast<char*>(aBuffer),
|
||||
static_cast<uint32_t>(aSize), &read);
|
||||
const nsresult rv = mSource.ReadAt(aOffset, reinterpret_cast<char*>(aBuffer),
|
||||
static_cast<uint32_t>(aSize), &read);
|
||||
NS_ENSURE_SUCCESS(rv, 0);
|
||||
return static_cast<int32_t>(read);
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ private:
|
||||
double AverageFrameLength() const;
|
||||
|
||||
// The (hopefully) MPEG resource.
|
||||
nsRefPtr<MediaResource> mSource;
|
||||
MediaResourceIndex mSource;
|
||||
|
||||
// MPEG frame parser used to detect frames and extract side info.
|
||||
FrameParser mParser;
|
||||
|
Loading…
Reference in New Issue
Block a user