Bug 1288329: [ogg] P4. Don't assume we can't seek in resource if transport isn't seekable. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sun, 31 Jul 2016 13:31:54 +1000
changeset 349575 e49d5a02100e257e20cc9447633a8c8045c466f3
parent 349574 f9dec37d375c018a587eb20a6ec958fa3d4c28e9
child 349576 aced758afc8a544e744cab2d55e91eb95bc059d8
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1288329
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288329: [ogg] P4. Don't assume we can't seek in resource if transport isn't seekable. r=gerald We can seek in cached data, we will rely on the seek operation to fail instead to determine if we can't or not MozReview-Commit-ID: 3Ac7c1nTZTH
dom/media/ogg/OggDemuxer.cpp
--- a/dom/media/ogg/OggDemuxer.cpp
+++ b/dom/media/ogg/OggDemuxer.cpp
@@ -675,18 +675,17 @@ OggDemuxer::ReadMetadata()
     int64_t startTime = -1;
     FindStartTime(startTime);
     if (startTime >= 0) {
       OGG_DEBUG("Detected stream start time %lld", startTime);
       mStartTime.emplace(startTime);
     }
 
     if (mInfo.mMetadataDuration.isNothing() &&
-        Resource(TrackInfo::kAudioTrack)->GetLength() >= 0 &&
-        Resource(TrackInfo::kAudioTrack)->GetResource()->IsTransportSeekable()) {
+        Resource(TrackInfo::kAudioTrack)->GetLength() >= 0) {
       // We didn't get a duration from the index or a Content-Duration header.
       // Seek to the end of file to find the end time.
       int64_t length = Resource(TrackInfo::kAudioTrack)->GetLength();
 
       NS_ASSERTION(length > 0, "Must have a content length to get end time");
 
       int64_t endTime = RangeEndTime(TrackInfo::kAudioTrack, length);