[vlc-commits] demux: adaptative: avoid drops when not restarting on seek

Francois Cartegnie git at videolan.org
Thu Jul 16 23:04:28 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul 16 18:32:34 2015 +0200| [d5ddecc8c8092e606542136fe09085cb4bd3f97f] | committer: Francois Cartegnie

demux: adaptative: avoid drops when not restarting on seek

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

 modules/demux/adaptative/Streams.cpp |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index 81d69e9..30f5474 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -392,15 +392,17 @@ void BaseStreamOutput::setPosition(mtime_t nztime)
     {
         (*it)->drop();
     }
-    /* disable appending until restarted */
-    b_drop = true;
-    vlc_mutex_unlock(&lock);
 
     if(reinitsOnSeek())
+    {
+        /* disable appending until restarted */
+        b_drop = true;
+        vlc_mutex_unlock(&lock);
         restart();
+        vlc_mutex_lock(&lock);
+        b_drop = false;
+    }
 
-    vlc_mutex_lock(&lock);
-    b_drop = false;
     pcr = VLC_TS_INVALID;
     vlc_mutex_unlock(&lock);
 



More information about the vlc-commits mailing list