Bug 1215089 - P9: Enable 10/12 bits video with OGL compositor. r=mattwoodrow
☠☠ backed out by d58272098216 ☠ ☠
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sat, 30 Sep 2017 01:22:40 +0200
changeset 427088 752c2be759b6af79b7cb667013b60b9e2d4fad6a
parent 427087 a2cfe189c82837e157566e931a75bf8dcd49dced
child 427089 904d12098f33904e642bab4089c17700cd116e8c
push id97
push userfmarier@mozilla.com
push dateSat, 14 Oct 2017 01:12:59 +0000
reviewersmattwoodrow
bugs1215089
milestone58.0a1
Bug 1215089 - P9: Enable 10/12 bits video with OGL compositor. r=mattwoodrow MozReview-Commit-ID: AOSZla0ZX4S
dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
@@ -300,18 +300,20 @@ FFmpegVideoDecoder<LIBAV_VER>::DoDecode(
   }
 
   if ((mCodecContext->pix_fmt == AV_PIX_FMT_YUV420P10LE ||
        mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P10LE
 #if LIBAVCODEC_VERSION_MAJOR >= 57
        || mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P12LE
 #endif
        ) &&
-      (!mImageAllocator || mImageAllocator->GetCompositorBackendType()
-                           != layers::LayersBackend::LAYERS_BASIC)) {
+      (!mImageAllocator || (mImageAllocator->GetCompositorBackendType()
+                            != layers::LayersBackend::LAYERS_BASIC &&
+                            mImageAllocator->GetCompositorBackendType()
+                            != layers::LayersBackend::LAYERS_OPENGL))) {
     return MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
                        RESULT_DETAIL("unsupported format type (hdr)"));
   }
 
   // If we've decoded a frame then we need to output it
   int64_t pts = mPtsContext.GuessCorrectPts(mFrame->pkt_pts, mFrame->pkt_dts);
   // Retrieve duration from dts.
   // We use the first entry found matching this dts (this is done to