Bug 1101742 - Fix OmxDecoder::mIsVideoSeeking r= cajbir a=bajaj
authorSotaro Ikeda <sikeda@mozilla.com>
Fri, 21 Nov 2014 16:11:06 -0800
changeset 221362 dc3018cbdbe69109f5abeb37a0c8546dc8a14629
parent 221361 b8a95ed3d88f8e361f5a7e3ef4bababd0001f291
child 221363 3d2d47bfe3ffcfa88381270edcd1476d159a9ffe
push id217
push userkwierso@gmail.com
push dateSat, 22 Nov 2014 00:12:15 +0000
treeherdermozilla-b2g34_v2_1@dc3018cbdbe6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbajaj
bugs1101742
milestone34.0
Bug 1101742 - Fix OmxDecoder::mIsVideoSeeking r= cajbir a=bajaj
content/media/omx/OmxDecoder.cpp
--- a/content/media/omx/OmxDecoder.cpp
+++ b/content/media/omx/OmxDecoder.cpp
@@ -763,30 +763,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;