mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1258562: MSE] Abort if MediaSource has been shutdown. r=gerald
The assumption was made that this code was never called if MediaSourceDecoder::NextFrameBufferedStatus() had been called before. However, that assumption was incorrect as NextFrameBufferedStatus() is only called if we had determine we had no frame buffered. MozReview-Commit-ID: 1hsEJuInION --HG-- extra : rebase_source : f760ef8df01858c24887ba024c6b350332d2e4dc
This commit is contained in:
parent
79ad6e2449
commit
e4b81849b8
@ -277,6 +277,11 @@ bool
|
|||||||
MediaSourceDecoder::CanPlayThrough()
|
MediaSourceDecoder::CanPlayThrough()
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
|
if (NextFrameBufferedStatus() == MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (IsNaN(mMediaSource->Duration())) {
|
if (IsNaN(mMediaSource->Duration())) {
|
||||||
// Don't have any data yet.
|
// Don't have any data yet.
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user