Backed out 3 changesets (bug 951770) for test_playback.html timeouts
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 31 Jan 2014 23:39:04 -0800
changeset 182518 2b6516c8713ee35b353af98f47eb7a86ec6d5ec3
parent 182517 ed795ed2bc38766ce86c6ea7f69e716b536558a8
child 182519 bedbbb50c106fd84113b1eba78a082b422f10bc4
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs951770
milestone29.0a1
backs outed795ed2bc38766ce86c6ea7f69e716b536558a8
b4978efcdad91a964cb08bafc7c6791a33f7c977
4cddbc0d518340713b826a48689a534eaebc64e8
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
Backed out 3 changesets (bug 951770) for test_playback.html timeouts Backed out changeset ed795ed2bc38 (bug 951770) Backed out changeset b4978efcdad9 (bug 951770) Backed out changeset 4cddbc0d5183 (bug 951770)
content/media/webm/WebMReader.cpp
content/media/webm/WebMReader.h
--- a/content/media/webm/WebMReader.cpp
+++ b/content/media/webm/WebMReader.cpp
@@ -367,17 +367,17 @@ nsresult WebMReader::ReadMetadata(MediaI
         Cleanup();
         return NS_ERROR_FAILURE;
       }
 
       mAudioTrack = track;
       mHasAudio = true;
       mInfo.mAudio.mHasAudio = true;
       mAudioCodec = nestegg_track_codec_id(mContext, track);
-      mCodecDelay = params.codec_delay / NS_PER_USEC;
+      mCodecDelay = params.codec_delay;
 
       if (mAudioCodec == NESTEGG_CODEC_VORBIS) {
         // Get the Vorbis header data
         unsigned int nheaders = 0;
         r = nestegg_track_codec_data_count(mContext, track, &nheaders);
         if (r == -1 || nheaders != 3) {
           Cleanup();
           return NS_ERROR_FAILURE;
@@ -434,22 +434,16 @@ nsresult WebMReader::ReadMetadata(MediaI
           return NS_ERROR_FAILURE;
         }
 
         if (!InitOpusDecoder()) {
           Cleanup();
           return NS_ERROR_FAILURE;
         }
 
-        if (static_cast<int64_t>(mCodecDelay) != FramesToUsecs(mOpusParser->mPreSkip, mOpusParser->mRate).value()) {
-          LOG(PR_LOG_DEBUG, ("Values for CodecDelay and PreSkip do not match\n"));
-          Cleanup();
-          return NS_ERROR_FAILURE;
-        }
-
         mInfo.mAudio.mRate = mOpusParser->mRate;
 
         mInfo.mAudio.mChannels = mOpusParser->mChannels;
         mChannels = mInfo.mAudio.mChannels;
         mSeekPreroll = params.seek_preroll;
 #endif
       } else {
         Cleanup();
@@ -719,17 +713,17 @@ bool WebMReader::DecodeAudioPacket(neste
         return false;
       }
 
       CheckedInt64 duration = FramesToUsecs(frames, rate);
       if (!duration.isValid()) {
         NS_WARNING("Int overflow converting WebM audio duration");
         return false;
       }
-      CheckedInt64 time = startTime - mCodecDelay;
+      CheckedInt64 time = startTime - (mCodecDelay / NS_PER_USEC);
       if (!time.isValid()) {
         NS_WARNING("Int overflow shifting tstamp by codec delay");
         nestegg_free_packet(aPacket);
         return false;
       };
       AudioQueue().Push(new AudioData(mDecoder->GetResource()->Tell(),
                                      time.value(),
                                      duration.value(),
--- a/content/media/webm/WebMReader.h
+++ b/content/media/webm/WebMReader.h
@@ -210,17 +210,17 @@ private:
   uint32_t mAudioTrack;
 
   // Time in microseconds of the start of the first audio frame we've decoded.
   int64_t mAudioStartUsec;
 
   // Number of audio frames we've decoded since decoding began at mAudioStartMs.
   uint64_t mAudioFrames;
 
-  // Number of microseconds that must be discarded from the start of the Stream.
+  // Number of nanoseconds that must be discarded from the start of the Stream.
   uint64_t mCodecDelay;
 
   // Parser state and computed offset-time mappings.  Shared by multiple
   // readers when decoder has been cloned.  Main thread only.
   nsRefPtr<WebMBufferedState> mBufferedState;
 
   // Size of the frame initially present in the stream. The picture region
   // is defined as a ratio relative to this.