diff --git a/app/streaming/video/ffmpeg-renderers/cuda.cpp b/app/streaming/video/ffmpeg-renderers/cuda.cpp index b2382493..89790933 100644 --- a/app/streaming/video/ffmpeg-renderers/cuda.cpp +++ b/app/streaming/video/ffmpeg-renderers/cuda.cpp @@ -16,10 +16,15 @@ CUDARenderer::~CUDARenderer() } } -bool CUDARenderer::initialize(PDECODER_PARAMETERS) +bool CUDARenderer::initialize(PDECODER_PARAMETERS params) { int err; + // This renderer only supports NV12 output + if (params->videoFormat & (VIDEO_FORMAT_MASK_10BIT | VIDEO_FORMAT_MASK_YUV444)) { + return false; + } + err = av_hwdevice_ctx_create(&m_HwContext, AV_HWDEVICE_TYPE_CUDA, nullptr, nullptr, 0); if (err != 0) { m_InitFailureReason = InitFailureReason::NoSoftwareSupport; diff --git a/app/streaming/video/ffmpeg-renderers/cuda.h b/app/streaming/video/ffmpeg-renderers/cuda.h index d58a56c7..60e3e5ab 100644 --- a/app/streaming/video/ffmpeg-renderers/cuda.h +++ b/app/streaming/video/ffmpeg-renderers/cuda.h @@ -12,7 +12,7 @@ class CUDARenderer : public IFFmpegRenderer { public: CUDARenderer(); virtual ~CUDARenderer() override; - virtual bool initialize(PDECODER_PARAMETERS) override; + virtual bool initialize(PDECODER_PARAMETERS params) override; virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary** options) override; virtual void renderFrame(AVFrame* frame) override; virtual bool isDirectRenderingSupported() override;