Bug 1059601 - Make sure we don't try to play audio with a system driver. r=jesup
--- a/content/media/MediaStreamGraph.cpp
+++ b/content/media/MediaStreamGraph.cpp
@@ -1305,22 +1305,24 @@ MediaStreamGraphImpl::Process(GraphTime
"Stream did not produce enough data");
}
}
}
NotifyHasCurrentData(stream);
// Only playback audio and video in real-time mode
if (mRealtime) {
CreateOrDestroyAudioStreams(aFrom, stream);
- TrackTicks ticksPlayedForThisStream = PlayAudio(stream, aFrom, aTo);
- if (!ticksPlayed) {
- ticksPlayed = ticksPlayedForThisStream;
- } else {
- MOZ_ASSERT(!ticksPlayedForThisStream || ticksPlayedForThisStream == ticksPlayed,
- "Each stream should have the same number of frame.");
+ if (CurrentDriver()->AsAudioCallbackDriver()) {
+ TrackTicks ticksPlayedForThisStream = PlayAudio(stream, aFrom, aTo);
+ if (!ticksPlayed) {
+ ticksPlayed = ticksPlayedForThisStream;
+ } else {
+ MOZ_ASSERT(!ticksPlayedForThisStream || ticksPlayedForThisStream == ticksPlayed,
+ "Each stream should have the same number of frame.");
+ }
}
PlayVideo(stream);
}
SourceMediaStream* is = stream->AsSourceStream();
if (is) {
UpdateBufferSufficiencyState(is);
}
GraphTime end;