[vlc-commits] demux:smooth: use std::max() to compute the minimum buffer duration

Steve Lhomme git at videolan.org
Fri Jul 6 09:20:36 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul  6 08:49:44 2018 +0200| [e403178df27479a033a2d528c93a8da2f0a9d803] | committer: Steve Lhomme

demux:smooth: use std::max() to compute the minimum buffer duration

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

 modules/demux/smooth/SmoothManager.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/demux/smooth/SmoothManager.cpp b/modules/demux/smooth/SmoothManager.cpp
index 7251efd199..0cd159013d 100644
--- a/modules/demux/smooth/SmoothManager.cpp
+++ b/modules/demux/smooth/SmoothManager.cpp
@@ -135,8 +135,7 @@ void SmoothManager::scheduleNextUpdate()
     if(playlist->minUpdatePeriod.Get() > minbuffer)
         minbuffer = playlist->minUpdatePeriod.Get();
 
-    if(minbuffer < VLC_TICK_FROM_SEC(5))
-        minbuffer = VLC_TICK_FROM_SEC(5);
+    minbuffer = std::max(minbuffer, VLC_TICK_FROM_SEC(5));
 
     nextPlaylistupdate = now + minbuffer / CLOCK_FREQ;
 



More information about the vlc-commits mailing list