Bug 1098195 - Return false when failing to get output format. r=edwin
authorAlfredo Yang <ayang@mozilla.com>
Thu, 13 Nov 2014 01:26:00 -0500
changeset 215540 b8613576f657b89240fc2f2dd52a9413f9ac7f52
parent 215539 12034172f9be3fc32afe220e60ef46f34ba2d339
child 215541 ca998f9e1b7180e9ea419b66be5d285387f395f7
push id27818
push userryanvm@gmail.com
push dateThu, 13 Nov 2014 20:19:09 +0000
treeherdermozilla-central@292ed84594c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1098195
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 1098195 - Return false when failing to get output format. r=edwin
dom/media/fmp4/gonk/GonkVideoDecoderManager.cpp
--- a/dom/media/fmp4/gonk/GonkVideoDecoderManager.cpp
+++ b/dom/media/fmp4/gonk/GonkVideoDecoderManager.cpp
@@ -289,18 +289,20 @@ GonkVideoDecoderManager::SetVideoFormat(
     mFrameInfo.mSliceHeight = slice_height;
     mFrameInfo.mColorFormat = color_format;
 
     nsIntSize displaySize(width, height);
     if (!IsValidVideoRegion(mInitialFrame, mPicture, displaySize)) {
       ALOG("It is not a valid region");
       return false;
     }
+    return true;
   }
-  return true;
+  ALOG("Fail to get output format");
+  return false;
 }
 
 // Blocks until decoded sample is produced by the deoder.
 nsresult
 GonkVideoDecoderManager::Output(int64_t aStreamOffset,
                                 nsAutoPtr<MediaData>& aOutData)
 {
   aOutData = nullptr;