From 66b1715d7852ab4e30ac93abeae04f98fb1c1975 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 10 Aug 2020 03:25:36 +0200 Subject: [PATCH] ffmpeg/tools: Fix compatibility with Ubuntu 18.04 --- source/ffmpeg/tools.cpp | 5 +---- source/ffmpeg/tools.hpp | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/source/ffmpeg/tools.cpp b/source/ffmpeg/tools.cpp index 5905a2c2..c1e133b2 100644 --- a/source/ffmpeg/tools.cpp +++ b/source/ffmpeg/tools.cpp @@ -21,9 +21,7 @@ #include "tools.hpp" #include -#include #include -#include #include "plugin.hpp" extern "C" { @@ -172,7 +170,7 @@ bool tools::can_hardware_encode(const AVCodec* codec) std::vector tools::get_software_formats(const AVPixelFormat* list) { - AVPixelFormat hardware_formats[] = { + constexpr AVPixelFormat hardware_formats[] = { #if FF_API_VAAPI AV_PIX_FMT_VAAPI_MOCO, AV_PIX_FMT_VAAPI_IDCT, @@ -188,7 +186,6 @@ std::vector tools::get_software_formats(const AVPixelFormat* list AV_PIX_FMT_VIDEOTOOLBOX, AV_PIX_FMT_MEDIACODEC, AV_PIX_FMT_D3D11, - AV_PIX_FMT_OPENCL, }; std::vector fmts; diff --git a/source/ffmpeg/tools.hpp b/source/ffmpeg/tools.hpp index e58bd19b..3d1249f0 100644 --- a/source/ffmpeg/tools.hpp +++ b/source/ffmpeg/tools.hpp @@ -22,8 +22,6 @@ #pragma once #include "common.hpp" #include -#include -#include extern "C" { #ifdef _MSC_VER