Bug 1101742 - Fix OmxDecoder::mIsVideoSeeking r= cajbir
authorSotaro Ikeda <sikeda@mozilla.com>
Thu, 20 Nov 2014 06:34:16 -0800
changeset 216645 59f78368b454c3eb0e72a2a464d0279f9f78a68f
parent 216644 bd04d03f7980b44d400ff1c5fb301dc6c58b60eb
child 216646 34594cb8b2e4a356a0a71b6685b198c70b4c4f0e
push id27858
push userkwierso@gmail.com
push dateFri, 21 Nov 2014 01:35:46 +0000
treeherdermozilla-central@6309710dd71d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1101742
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 1101742 - Fix OmxDecoder::mIsVideoSeeking r= cajbir
dom/media/omx/OmxDecoder.cpp
--- a/dom/media/omx/OmxDecoder.cpp
+++ b/dom/media/omx/OmxDecoder.cpp
@@ -577,30 +577,34 @@ bool OmxDecoder::ReadVideo(VideoFrame *a
       err = mVideoSource->read(&mVideoBuffer, &options);
       {
         Mutex::Autolock autoLock(mSeekLock);
         mIsVideoSeeking = false;
         PostReleaseVideoBuffer(nullptr, FenceHandle());
       }
       // If there is no next Keyframe, jump to the previous key frame.
       if (err == ERROR_END_OF_STREAM && seekMode == MediaSource::ReadOptions::SEEK_NEXT_SYNC) {
-         seekMode = MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC;
-	 findNextBuffer = true;
-	 {
-	   Mutex::Autolock autoLock(mSeekLock);
-	   mIsVideoSeeking = true;
-	 }
-	 continue;
+        seekMode = MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC;
+        findNextBuffer = true;
+        {
+          Mutex::Autolock autoLock(mSeekLock);
+          mIsVideoSeeking = true;
+        }
+        continue;
       } else if (err != OK) {
-	ALOG("Unexpected error when seeking to %lld", aTimeUs);
+        ALOG("Unexpected error when seeking to %lld", aTimeUs);
         break;
       }
       if (mVideoBuffer->range_length() == 0) {
         ReleaseVideoBuffer();
-	findNextBuffer = true;
+        findNextBuffer = true;
+        {
+          Mutex::Autolock autoLock(mSeekLock);
+          mIsVideoSeeking = true;
+        }
       }
     }
     aDoSeek = false;
   } else {
     err = mVideoSource->read(&mVideoBuffer);
   }
 
   aFrame->mSize = 0;