demux: adaptive: fix slow buffering
authorZhao Zhili <wantlamy@gmail.com>
Fri, 28 Jul 2017 11:54:50 +0000 (19:54 +0800)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 1 Aug 2017 17:38:11 +0000 (19:38 +0200)
Signed-off-by: Francois Cartegnie <fcvlcdev@free.fr>
modules/demux/adaptive/PlaylistManager.cpp

index 771fdfa..05acf08 100644 (file)
@@ -651,9 +651,9 @@ void PlaylistManager::Run()
         if(i_return != AbstractStream::buffering_lessthanmin)
         {
             mtime_t i_deadline = mdate();
-            if (i_return == AbstractStream::buffering_ongoing)
+            if(i_return == AbstractStream::buffering_ongoing)
                 i_deadline += (CLOCK_FREQ / 20);
-            if (i_return == AbstractStream::buffering_full)
+            else if(i_return == AbstractStream::buffering_full)
                 i_deadline += (CLOCK_FREQ / 10);
             else if(i_return == AbstractStream::buffering_end)
                 i_deadline += (CLOCK_FREQ);