[vlc-commits] doc: QtGl: release token when cleanup

Alexandre Janniaux git at videolan.org
Wed Nov 18 09:22:54 CET 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Tue Nov 17 11:14:48 2020 +0100| [0e7d444c0c471159fad55cb1c585c2d0ad677347] | committer: Alexandre Janniaux

doc: QtGl: release token when cleanup

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0e7d444c0c471159fad55cb1c585c2d0ad677347
---

 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];



More information about the vlc-commits mailing list