mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1289334 - HTMLMediaElement::ResetConnectionState() should shut down the decoder. r=cpearce
MozReview-Commit-ID: 7IZ2Y4Da7xZ --HG-- extra : rebase_source : 492b0caa52fca17d2c399c2f0e2c426c6f55872f
This commit is contained in:
parent
a2a7e29ce7
commit
8e6ae76d98
@ -2614,6 +2614,9 @@ HTMLMediaElement::ResetConnectionState()
|
||||
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_EMPTY);
|
||||
ChangeDelayLoadStatus(false);
|
||||
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_NOTHING);
|
||||
if (mDecoder) {
|
||||
ShutdownDecoder();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1025,14 +1025,8 @@ MediaDecoder::ResetConnectionState()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(!IsShutdown());
|
||||
|
||||
// Notify the media element that connection gets lost.
|
||||
mOwner->ResetConnectionState();
|
||||
|
||||
// Since we have notified the media element the connection
|
||||
// lost event, the decoder will be reloaded when user tries
|
||||
// to play the Rtsp streaming next time.
|
||||
Shutdown();
|
||||
MOZ_ASSERT(IsShutdown());
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -134,8 +134,10 @@ public:
|
||||
// ImageContainer containing the video data.
|
||||
virtual VideoFrameContainer* GetVideoFrameContainer() = 0;
|
||||
|
||||
// Called by the media decoder object, on the main thread,
|
||||
// Called by the decoder object, on the main thread,
|
||||
// when the connection between Rtsp server and client gets lost.
|
||||
// The decoder owner should call Shutdown() on the decoder and drop the
|
||||
// reference to the decoder to prevent further calls into the decoder.
|
||||
virtual void ResetConnectionState() = 0;
|
||||
|
||||
// Called by media decoder when the audible state changed
|
||||
|
Loading…
Reference in New Issue
Block a user