From 439e8fe33f64c8cf9712f40358d9571567c76367 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 24 Sep 2022 18:37:51 -0500 Subject: [PATCH] Constify frame colorspace helper functions --- app/streaming/video/ffmpeg-renderers/renderer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/renderer.h b/app/streaming/video/ffmpeg-renderers/renderer.h index f1d0c3c8..1ac89394 100644 --- a/app/streaming/video/ffmpeg-renderers/renderer.h +++ b/app/streaming/video/ffmpeg-renderers/renderer.h @@ -158,7 +158,7 @@ public: return COLORSPACE_REC_601; } - virtual int getFrameColorspace(AVFrame* frame) { + virtual int getFrameColorspace(const AVFrame* frame) { // Prefer the colorspace field on the AVFrame itself switch (frame->colorspace) { case AVCOL_SPC_SMPTE170M: @@ -176,7 +176,7 @@ public: } } - virtual bool isFrameFullRange(AVFrame* frame) { + virtual bool isFrameFullRange(const AVFrame* frame) { // This handles the case where the color range is unknown, // so that we use Limited color range which is the default // behavior for Moonlight.