Bug 1078125 - fix RtspMediaCodecReader::ReadMetadata, start the network streaming before ReadMetadata and enable play-out delay. r=cpearce, r=ethan
authorBenjamin Chen <bechen@mozilla.com>
Thu, 20 Nov 2014 10:22:39 +0800
changeset 216846 aa46b3ca0f9f507db37215265d9a8d10dfacb003
parent 216845 48a024873cbca590c16e325bf45edc64a912471b
child 216847 0a8346276fb93d6929a04f4df1f5de9427fe4573
push id27866
push userkwierso@gmail.com
push dateFri, 21 Nov 2014 23:04:21 +0000
treeherderautoland@b612d5a501f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, ethan
bugs1078125
milestone36.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 1078125 - fix RtspMediaCodecReader::ReadMetadata, start the network streaming before ReadMetadata and enable play-out delay. r=cpearce, r=ethan
dom/media/omx/RtspMediaCodecReader.cpp
--- a/dom/media/omx/RtspMediaCodecReader.cpp
+++ b/dom/media/omx/RtspMediaCodecReader.cpp
@@ -88,17 +88,21 @@ RtspMediaCodecReader::RequestVideoData(b
   EnsureActive();
   MediaCodecReader::RequestVideoData(aSkipToNextKeyframe, aTimeThreshold);
 }
 
 nsresult
 RtspMediaCodecReader::ReadMetadata(MediaInfo* aInfo,
                                    MetadataTags** aTags)
 {
+  mRtspResource->DisablePlayoutDelay();
+  EnsureActive();
   nsresult rv = MediaCodecReader::ReadMetadata(aInfo, aTags);
+  SetIdle();
+
   if (rv == NS_OK && !IsWaitingMediaResources()) {
-    EnsureActive();
+    mRtspResource->EnablePlayoutDelay();
   }
 
   return rv;
 }
 
 } // namespace mozilla