From bf978223d85c1f5a2922705be80436efc96c4ac2 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 11 Nov 2014 19:00:32 -0800 Subject: [PATCH] Start the video decoder before reading the first frame to give it time to warm up --- limelight-common/VideoStream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/limelight-common/VideoStream.c b/limelight-common/VideoStream.c index 961a7f4..dfe17dc 100644 --- a/limelight-common/VideoStream.c +++ b/limelight-common/VideoStream.c @@ -179,6 +179,10 @@ int startVideoStream(void* rendererContext, int drFlags) { if (err != 0) { return err; } + + // This must be called before the decoder thread starts submitting + // decode units + callbacks.start(); err = readFirstFrame(); if (err != 0) { @@ -190,10 +194,6 @@ int startVideoStream(void* rendererContext, int drFlags) { return err; } - //This must be called before the decoder thread starts submitting - // decode units - callbacks.start(); - err = PltCreateThread(DecoderThreadProc, NULL, &decoderThread); if (err != 0) { return err;