mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
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:
parent
1378239108
commit
d4ed859ea5
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user