[vlc-devel] [RFC] [PATCH 1/2] demux: adaptive: fix cancellation during refresh playlist

Zhao Zhili quinkblack at foxmail.com
Wed Sep 13 08:46:10 CEST 2017


This patch fixed a crash due to assert failure since mutex is not
unlocked before vlc_mutex_destroy().
---
  modules/demux/adaptive/PlaylistManager.cpp | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/modules/demux/adaptive/PlaylistManager.cpp 
b/modules/demux/adaptive/PlaylistManager.cpp
index 3ee5014..706ece0 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -633,10 +633,12 @@ void PlaylistManager::Run()

          if(needsUpdate())
          {
+            int canc = vlc_savecancel();
              if(updatePlaylist())
                  scheduleNextUpdate();
              else
                  failedupdates++;
+            vlc_restorecancel(canc);
          }

          vlc_mutex_lock(&demux.lock);
-- 
2.7.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-demux-adaptive-fix-cancellation-during-refresh-playl.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170913/0d1c8f38/attachment.bin>


More information about the vlc-devel mailing list