Bug 774901 - Don't recreate MediaResource channel during seek if resource is still suspended. r=roc

--HG--
extra : rebase_source : d6ee9bbc3b5705ca9006a7e0723021be5230fb52
This commit is contained in:
Matthew Gregan 2012-07-25 17:50:13 +12:00
parent 1378239108
commit d4ed859ea5

View File

@ -763,11 +763,22 @@ ChannelMediaResource::CacheClientSeek(PRInt64 aOffset, bool aResume)
--mSuspendCount;
}
mOffset = aOffset;
if (mSuspendCount > 0) {
// Close the existing channel to force the channel to be recreated at
// the correct offset upon resume.
if (mChannel) {
mIgnoreClose = true;
CloseChannel();
}
return NS_OK;
}
nsresult rv = RecreateChannel();
if (NS_FAILED(rv))
return rv;
mOffset = aOffset;
return OpenChannel(nsnull);
}