[vlc-commits] demux: adaptative: always drop buffers 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:28:51 2015 +0200| [25575cbe0c1553bd8ad80fe1e998416a11f96547] | committer: Francois Cartegnie

demux: adaptative: always drop buffers on seek

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

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

diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index 26120f4..81d69e9 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -390,9 +390,7 @@ void BaseStreamOutput::setPosition(mtime_t nztime)
     std::list<Demuxed *>::const_iterator it;
     for(it=queues.begin(); it!=queues.end();++it)
     {
-        Demuxed *pair = *it;
-        if(pair->p_queue && pair->p_queue->i_dts > VLC_TS_0 + nztime)
-            pair->drop();
+        (*it)->drop();
     }
     /* disable appending until restarted */
     b_drop = true;
@@ -493,9 +491,12 @@ BaseStreamOutput::Demuxed::~Demuxed()
 
 void BaseStreamOutput::Demuxed::drop()
 {
-    block_ChainRelease(p_queue);
-    p_queue = NULL;
-    pp_queue_last = &p_queue;
+    if(p_queue)
+    {
+        block_ChainRelease(p_queue);
+        p_queue = NULL;
+        pp_queue_last = &p_queue;
+    }
 }
 
 /* Static callbacks */



More information about the vlc-commits mailing list