From 234a8dc3d575e0783a57a594e65da6cc082ef4ea Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 31 Aug 2018 10:40:25 -0400 Subject: [PATCH] Fix build with HAVE_SLVIDEO --- app/streaming/session.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/streaming/session.cpp b/app/streaming/session.cpp index 6c1cd69d..4f93d881 100644 --- a/app/streaming/session.cpp +++ b/app/streaming/session.cpp @@ -108,13 +108,15 @@ void Session::clLogMessage(const char* format, ...) va_end(ap); } +#define CALL_INITIALIZE(dec) (dec)->initialize(vds, window, videoFormat, width, height, frameRate, enableVsync) + bool Session::chooseDecoder(StreamingPreferences::VideoDecoderSelection vds, SDL_Window* window, int videoFormat, int width, int height, int frameRate, bool enableVsync, IVideoDecoder*& chosenDecoder) { #ifdef HAVE_SLVIDEO chosenDecoder = new SLVideoDecoder(); - if (chosenDecoder->initialize(vds, window, videoFormat, width, height, frameRate)) { + if (CALL_INITIALIZE(chosenDecoder)) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "SLVideo video decoder chosen"); return true; @@ -129,7 +131,7 @@ bool Session::chooseDecoder(StreamingPreferences::VideoDecoderSelection vds, #ifdef HAVE_FFMPEG chosenDecoder = new FFmpegVideoDecoder(); - if (chosenDecoder->initialize(vds, window, videoFormat, width, height, frameRate, enableVsync)) { + if (CALL_INITIALIZE(chosenDecoder)) { SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "FFmpeg-based video decoder chosen"); return true;