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

Francois Cartegnie git at videolan.org
Mon Mar 30 16:16:45 CEST 2020


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

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

(cherry picked from commit 576dec1bd235885fa9f9b627949a4fc5e40e4118)

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

 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 47fb04e63b..ce081dda57 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -465,7 +465,10 @@ AbstractStream::status AbstractStream::dequeue(mtime_t nz_deadline, mtime_t *pi_
 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
@@ -475,7 +478,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