blob: c0e6d3aa70bd21fdbea27dfcca4558c4f31fc881 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
@@ -172,6 +172,15 @@
MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitVAAPIDecoder() {
FFMPEG_LOG("Initialising VA-API FFmpeg decoder");
+ auto layersBackend = mImageAllocator
+ ? mImageAllocator->GetCompositorBackendType()
+ : layers::LayersBackend::LAYERS_BASIC;
+ if (layersBackend != layers::LayersBackend::LAYERS_OPENGL &&
+ layersBackend != layers::LayersBackend::LAYERS_WR) {
+ FFMPEG_LOG("VA-API works with HW accelerated backend only!");
+ return NS_ERROR_NOT_AVAILABLE;
+ }
+
if (!mLib->IsVAAPIAvailable()) {
FFMPEG_LOG("libva library or symbols are missing.");
return NS_ERROR_NOT_AVAILABLE;
|