mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 22:50:57 +00:00
Fix race condition where a separate test decoder could ingest a real frame
This commit is contained in:
@@ -33,10 +33,21 @@ public:
|
||||
virtual IFFmpegRenderer* getBackendRenderer();
|
||||
|
||||
private:
|
||||
enum class TestMode {
|
||||
// No test frame and prepare for rendering
|
||||
NoTesting,
|
||||
|
||||
// Submit only the test frame and do not prepare for rendering
|
||||
TestFrameOnly,
|
||||
|
||||
// Submit the test frame and prepare for rendering
|
||||
TestFrame
|
||||
};
|
||||
|
||||
bool completeInitialization(const AVCodec* decoder,
|
||||
enum AVPixelFormat requiredFormat,
|
||||
PDECODER_PARAMETERS params,
|
||||
bool testFrame,
|
||||
TestMode testMode,
|
||||
bool useAlternateFrontend);
|
||||
|
||||
void stringifyVideoStats(VIDEO_STATS& stats, char* output, int length);
|
||||
@@ -116,6 +127,7 @@ private:
|
||||
int m_VideoFormat;
|
||||
bool m_NeedsSpsFixup;
|
||||
bool m_TestOnly;
|
||||
TestMode m_CurrentTestMode;
|
||||
SDL_Thread* m_DecoderThread;
|
||||
SDL_atomic_t m_DecoderThreadShouldQuit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user