Switch the decoder lock to a mutex

It can be held for non-trivial amounts of time.
This commit is contained in:
Cameron Gutman
2025-10-12 15:47:09 -05:00
parent c9cb64f90b
commit c0d38ee78f
2 changed files with 23 additions and 18 deletions

View File

@@ -100,10 +100,7 @@ class Session : public QObject
public:
explicit Session(NvComputer* computer, NvApp& app, StreamingPreferences *preferences = nullptr);
// NB: This may not get destroyed for a long time! Don't put any cleanup here.
// Use Session::exec() or DeferredSessionCleanupTask instead.
virtual ~Session() {};
virtual ~Session();
Q_INVOKABLE void exec(QWindow* qtWindow);
@@ -255,7 +252,7 @@ private:
NvApp m_App;
SDL_Window* m_Window;
IVideoDecoder* m_VideoDecoder;
SDL_SpinLock m_DecoderLock;
SDL_mutex* m_DecoderLock;
bool m_AudioDisabled;
bool m_AudioMuted;
Uint32 m_FullScreenFlag;