Bug 1280346: Only consider a video info as invalid if image dimensions are null. r=rillian
☠☠ backed out by 8e9ae4616b56 ☠ ☠
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 12 Jul 2016 16:46:33 +1000
changeset 330505 128c1454e51f99155b4aa7222e604bd24a014fbf
parent 330504 664b7f0f51249ab6da269f8ac9d31b54eef0d03e
child 330506 75f8e3a05ef807ec1494dffe691016fa01206186
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1280346
milestone50.0a1
Bug 1280346: Only consider a video info as invalid if image dimensions are null. r=rillian Display dimensions are actually determined from the SPS NAL with h264 and as such we don't really care on what is found in the container (which may be incorrect). MozReview-Commit-ID: 7JmxIawNOOn
dom/media/MediaInfo.h
media/libstagefright/binding/DecoderData.cpp
--- a/dom/media/MediaInfo.h
+++ b/dom/media/MediaInfo.h
@@ -215,17 +215,17 @@ public:
     , mExtraData(aOther.mExtraData)
     , mRotation(aOther.mRotation)
     , mImageRect(aOther.mImageRect)
   {
   }
 
   bool IsValid() const override
   {
-    return mDisplay.width > 0 && mDisplay.height > 0;
+    return mImage.width > 0 && mImage.height > 0;
   }
 
   VideoInfo* GetAsVideoInfo() override
   {
     return this;
   }
 
   const VideoInfo* GetAsVideoInfo() const override
--- a/media/libstagefright/binding/DecoderData.cpp
+++ b/media/libstagefright/binding/DecoderData.cpp
@@ -205,12 +205,12 @@ MP4VideoInfo::Update(const mp4parse_trac
   mImage.width = video->image_width;
   mImage.height = video->image_height;
 }
 #endif
 
 bool
 MP4VideoInfo::IsValid() const
 {
-  return mDisplay.width > 0 && mDisplay.height > 0;
+  return mImage.width > 0 && mImage.height > 0;
 }
 
 }