Bug 1059601 - Make sure we don't try to play audio with a system driver. r=jesup
authorPaul Adenot <paul@paul.cx>
Wed, 27 Aug 2014 19:13:15 +0200
changeset 223866 546a04de2db6f9a5f29afbc4d72d617feb365936
parent 223865 7402fa69f77a84dcb29a830db8236a23e69e6a20
child 223867 602966888eb0643b0580b14205ac75c6474fd422
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1059601
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1059601 - Make sure we don't try to play audio with a system driver. r=jesup
content/media/MediaStreamGraph.cpp
--- 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;