[vlc-devel] [PATCH 1/2] doc: QtGl: release token when cleanup

Alexandre Janniaux ajanni at videolabs.io
Tue Nov 17 11:17:35 CET 2020


We're waiting for the surface to be available and protecting the surface
from having multiple clients at the same time, but it typically didn't
return the token when cleanup(), meaning that any second open was
actually a deadlock in the waiting.
---
 doc/libvlc/QtGL/qtvlcwidget.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/libvlc/QtGL/qtvlcwidget.cpp b/doc/libvlc/QtGL/qtvlcwidget.cpp
index 134ad06601..98f43b8aeb 100644
--- a/doc/libvlc/QtGL/qtvlcwidget.cpp
+++ b/doc/libvlc/QtGL/qtvlcwidget.cpp
@@ -117,6 +117,9 @@ public:
     static void cleanup(void* data)
     {
         VLCVideo* that = static_cast<VLCVideo*>(data);
+
+        that->videoReady.release();
+
         if (that->m_width == 0 && that->m_height == 0)
             return;
         delete that->mBuffers[0];
-- 
2.29.2



More information about the vlc-devel mailing list