[vlc-commits] demux: adaptive: don't hold esoutLock while downloading chunk

Francois Cartegnie git at videolan.org
Tue Mar 24 23:35:13 CET 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Feb 14 14:38:07 2020 +0100| [576dec1bd235885fa9f9b627949a4fc5e40e4118] | committer: Francois Cartegnie

demux: adaptive: don't hold esoutLock while downloading chunk

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

 modules/demux/adaptive/Streams.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index 12c0a3183b..f78aaf1a70 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -463,7 +463,10 @@ AbstractStream::status AbstractStream::dequeue(vlc_tick_t nz_deadline, vlc_tick_
 std::string AbstractStream::getContentType()
 {
     if (currentChunk == NULL && !eof)
-        currentChunk = segmentTracker->getNextChunk(!fakeEsOut()->restarting(), connManager);
+    {
+        const bool b_restarting = fakeEsOut()->restarting();
+        currentChunk = segmentTracker->getNextChunk(!b_restarting, connManager);
+    }
     if(currentChunk)
         return currentChunk->getContentType();
     else
@@ -473,7 +476,10 @@ std::string AbstractStream::getContentType()
 block_t * AbstractStream::readNextBlock()
 {
     if (currentChunk == NULL && !eof)
-        currentChunk = segmentTracker->getNextChunk(!fakeEsOut()->restarting(), connManager);
+    {
+        const bool b_restarting = fakeEsOut()->restarting();
+        currentChunk = segmentTracker->getNextChunk(!b_restarting, connManager);
+    }
 
     if(discontinuity && demuxfirstchunk)
     {



More information about the vlc-commits mailing list