mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879669 - Part 1: Don't callback if there is no track in MediaStream. r=roc
This commit is contained in:
parent
5be0c2b8f3
commit
74fa67f516
@ -324,6 +324,9 @@ DOMMediaStream::OnTracksAvailable(OnTracksAvailableCallback* aRunnable)
|
||||
void
|
||||
DOMMediaStream::CheckTracksAvailable()
|
||||
{
|
||||
if (mTrackTypesAvailable == 0) {
|
||||
return;
|
||||
}
|
||||
nsTArray<nsAutoPtr<OnTracksAvailableCallback> > callbacks;
|
||||
callbacks.SwapElements(mRunOnTracksAvailable);
|
||||
|
||||
|
@ -164,6 +164,7 @@ public:
|
||||
// We only care about track additions, we'll fire the notification even if
|
||||
// some of the tracks have been removed.
|
||||
// Takes ownership of aCallback.
|
||||
// If GetExpectedTracks() returns 0, the callback will be fired as soon as there are any tracks.
|
||||
void OnTracksAvailable(OnTracksAvailableCallback* aCallback);
|
||||
|
||||
/**
|
||||
@ -182,6 +183,7 @@ protected:
|
||||
void InitSourceStream(nsIDOMWindow* aWindow, TrackTypeHints aHintContents);
|
||||
void InitTrackUnionStream(nsIDOMWindow* aWindow, TrackTypeHints aHintContents);
|
||||
void InitStreamCommon(MediaStream* aStream);
|
||||
|
||||
void CheckTracksAvailable();
|
||||
|
||||
class StreamListener;
|
||||
|
Loading…
Reference in New Issue
Block a user