Fix race condition where a separate test decoder could ingest a real frame
This commit is contained in:
parent
a8e8efb17b
commit
d3957b3cbb
2 changed files with 29 additions and 14 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue