Bug 1413858 - Resume() needs to reset mPendingSeekOffset before calling Seek(). r=gerald

MozReview-Commit-ID: GbZ3SvSTMvR

--HG--
extra : rebase_source : 4579ffa96a7d8117827b71e2f0fcb73e3bfc996a
This commit is contained in:
JW Wang 2017-11-02 20:25:57 +08:00
parent b12480e8c5
commit e7d1c35d12

View File

@ -744,9 +744,10 @@ ChannelMediaResource::Resume()
if (totalLength < 0 || GetOffset() < totalLength) {
// There is (or may be) data to read, so start reading it.
// Need to recreate the channel.
Seek(mPendingSeekOffset != -1 ? mPendingSeekOffset : GetOffset(),
false);
int64_t offset =
mPendingSeekOffset != -1 ? mPendingSeekOffset : GetOffset();
mPendingSeekOffset = -1;
Seek(offset, false);
element->DownloadResumed();
} else {
// The channel remains dead. Do not notify DownloadResumed() which