mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 785671 - nsHTMLMediaElement::mSrcStreamListener should be an nsRefPtr r=roc
This commit is contained in:
parent
ba13045df3
commit
501d88a50c
@ -647,8 +647,8 @@ protected:
|
||||
};
|
||||
nsTArray<OutputMediaStream> mOutputStreams;
|
||||
|
||||
// Holds a reference to the MediaStreamListener attached to mSrcStream. STRONG!
|
||||
StreamListener* mSrcStreamListener;
|
||||
// Holds a reference to the MediaStreamListener attached to mSrcStream.
|
||||
nsRefPtr<StreamListener> mSrcStreamListener;
|
||||
|
||||
// Holds a reference to the first channel we open to the media resource.
|
||||
// Once the decoder is created, control over the channel passes to the
|
||||
|
@ -2601,7 +2601,6 @@ void nsHTMLMediaElement::SetupSrcMediaStreamPlayback()
|
||||
// XXX if we ever support capturing the output of a media element which is
|
||||
// playing a stream, we'll need to add a CombineWithPrincipal call here.
|
||||
mSrcStreamListener = new StreamListener(this);
|
||||
NS_ADDREF(mSrcStreamListener);
|
||||
GetSrcMediaStream()->AddListener(mSrcStreamListener);
|
||||
if (mPaused) {
|
||||
GetSrcMediaStream()->ChangeExplicitBlockerCount(1);
|
||||
@ -2627,7 +2626,7 @@ void nsHTMLMediaElement::EndSrcMediaStreamPlayback()
|
||||
GetSrcMediaStream()->RemoveListener(mSrcStreamListener);
|
||||
// Kill its reference to this element
|
||||
mSrcStreamListener->Forget();
|
||||
NS_RELEASE(mSrcStreamListener); // sets to null
|
||||
mSrcStreamListener = nullptr;
|
||||
GetSrcMediaStream()->RemoveAudioOutput(this);
|
||||
VideoFrameContainer* container = GetVideoFrameContainer();
|
||||
if (container) {
|
||||
|
Loading…
Reference in New Issue
Block a user