Bug 1117777 - Fix inverted MP4 videos on Android r=jgilbert
authorJames Willcox <snorp@snorp.net>
Mon, 05 Jan 2015 10:53:31 -0600
changeset 248351 6461b8a32d0eb94340b023587e910a1d1da6a708
parent 248350 12756e269785fbcdb500450a15911aacd8ee5192
child 248352 4f547cd4ce3da6147e8f78be0e4da2e64136e440
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1117777
milestone37.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 1117777 - Fix inverted MP4 videos on Android r=jgilbert
dom/media/fmp4/android/AndroidDecoderModule.cpp
gfx/layers/GLImages.cpp
--- a/dom/media/fmp4/android/AndroidDecoderModule.cpp
+++ b/dom/media/fmp4/android/AndroidDecoderModule.cpp
@@ -133,17 +133,17 @@ public:
     }
 
     nsRefPtr<layers::Image> img = mImageContainer->CreateImage(ImageFormat::EGLIMAGE);
     layers::EGLImageImage::Data data;
     data.mImage = eglImage;
     data.mSync = eglSync;
     data.mOwns = true;
     data.mSize = gfx::IntSize(mConfig.display_width, mConfig.display_height);
-    data.mOriginPos = gl::OriginPos::TopLeft;
+    data.mOriginPos = gl::OriginPos::BottomLeft;
 
     layers::EGLImageImage* typedImg = static_cast<layers::EGLImageImage*>(img.get());
     typedImg->SetData(data);
 
     bool isSync = !!(MediaCodec::getBUFFER_FLAG_SYNC_FRAME() & aInfo->getFlags());
 
     nsRefPtr<VideoData> v = VideoData::CreateFromImage(videoInfo, mImageContainer, aInfo->getOffset(),
                                                        aInfo->getPresentationTimeUs(),
--- a/gfx/layers/GLImages.cpp
+++ b/gfx/layers/GLImages.cpp
@@ -56,17 +56,17 @@ GLImage::GetAsSourceSurface()
                                 LOCAL_GL_RGBA,
                                 LOCAL_GL_UNSIGNED_BYTE,
                                 nullptr);
 
   ScopedFramebufferForTexture fb(sSnapshotContext, scopedTex.Texture());
 
   GLBlitHelper helper(sSnapshotContext);
 
-  helper.BlitImageToFramebuffer(this, size, fb.FB(), false);
+  helper.BlitImageToFramebuffer(this, size, fb.FB(), true);
 
   ScopedBindFramebuffer bind(sSnapshotContext, fb.FB());
 
   RefPtr<gfx::DataSourceSurface> source =
         gfx::Factory::CreateDataSourceSurface(size, gfx::SurfaceFormat::B8G8R8A8);
   if (NS_WARN_IF(!source)) {
     return nullptr;
   }