[vlc-commits] demux: adaptive: remove unused global drain

Francois Cartegnie git at videolan.org
Thu Feb 25 09:55:36 UTC 2021


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 24 14:24:33 2021 +0100| [72e0a0015252defec31c4fdbc54c8d521caa61d6] | committer: Francois Cartegnie

demux: adaptive: remove unused global drain

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

 modules/demux/adaptive/PlaylistManager.cpp | 21 ---------------------
 modules/demux/adaptive/PlaylistManager.h   |  1 -
 2 files changed, 22 deletions(-)

diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
index 66a7af3357..283c3f780b 100644
--- a/modules/demux/adaptive/PlaylistManager.cpp
+++ b/modules/demux/adaptive/PlaylistManager.cpp
@@ -295,27 +295,6 @@ AbstractStream::Status PlaylistManager::dequeue(vlc_tick_t i_floor, vlc_tick_t *
     return i_return;
 }
 
-void PlaylistManager::drain()
-{
-    for(;;)
-    {
-        bool b_drained = true;
-        for(AbstractStream *st : streams)
-        {
-            if (!st->isValid() || st->isDisabled())
-                continue;
-
-            b_drained &= st->decodersDrained();
-        }
-
-        if(b_drained)
-            break;
-
-        vlc_tick_sleep(VLC_TICK_FROM_MS(20)); /* ugly, but we have no way to get feedback */
-    }
-    es_out_Control(p_demux->out, ES_OUT_RESET_PCR);
-}
-
 vlc_tick_t PlaylistManager::getResumeTime() const
 {
     vlc_mutex_locker locker(&demux.lock);
diff --git a/modules/demux/adaptive/PlaylistManager.h b/modules/demux/adaptive/PlaylistManager.h
index 32b9c691e1..3eb900fdff 100644
--- a/modules/demux/adaptive/PlaylistManager.h
+++ b/modules/demux/adaptive/PlaylistManager.h
@@ -61,7 +61,6 @@ namespace adaptive
 
             AbstractStream::BufferingStatus bufferize(vlc_tick_t, vlc_tick_t, vlc_tick_t);
             AbstractStream::Status dequeue(vlc_tick_t, vlc_tick_t *);
-            void drain();
 
             virtual bool needsUpdate() const;
             virtual bool updatePlaylist();



More information about the vlc-commits mailing list