mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1090293 - Fix failure to get audio on first getUserMedia after start r=jesup
fix GetTrackTypesAvailable to not report placeholder tracks
This commit is contained in:
parent
6378e21c0a
commit
2bfd9ebf32
@ -345,11 +345,9 @@ DOMMediaStream::CreateDOMTrack(TrackID aTrackID, MediaSegment::Type aType)
|
||||
switch (aType) {
|
||||
case MediaSegment::AUDIO:
|
||||
track = new AudioStreamTrack(this, aTrackID);
|
||||
mTrackTypesAvailable |= HINT_CONTENTS_AUDIO;
|
||||
break;
|
||||
case MediaSegment::VIDEO:
|
||||
track = new VideoStreamTrack(this, aTrackID);
|
||||
mTrackTypesAvailable |= HINT_CONTENTS_VIDEO;
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("Unhandled track type");
|
||||
@ -369,7 +367,7 @@ DOMMediaStream::BindDOMTrack(TrackID aTrackID, MediaSegment::Type aType)
|
||||
track = mTracks[i]->AsAudioStreamTrack();
|
||||
if (track) {
|
||||
track->BindTrackID(aTrackID);
|
||||
MOZ_ASSERT(mTrackTypesAvailable & HINT_CONTENTS_AUDIO);
|
||||
mTrackTypesAvailable |= HINT_CONTENTS_AUDIO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -380,7 +378,7 @@ DOMMediaStream::BindDOMTrack(TrackID aTrackID, MediaSegment::Type aType)
|
||||
track = mTracks[i]->AsVideoStreamTrack();
|
||||
if (track) {
|
||||
track->BindTrackID(aTrackID);
|
||||
MOZ_ASSERT(mTrackTypesAvailable & HINT_CONTENTS_VIDEO);
|
||||
mTrackTypesAvailable |= HINT_CONTENTS_VIDEO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ protected:
|
||||
|
||||
// Indicate what track types we eventually expect to add to this stream
|
||||
uint8_t mHintContents;
|
||||
// Indicate what track types have been added to this stream
|
||||
// Indicate what track types have arrived in this stream
|
||||
uint8_t mTrackTypesAvailable;
|
||||
bool mNotifiedOfMediaStreamGraphShutdown;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user