[vlc-commits] chromecast: Don't reject buffering states

Hugo Beauzée-Luyssen git at videolan.org
Mon Jul 17 17:30:15 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jul  5 15:18:57 2017 +0200| [91498045b7d8cc388af15185156c97bffd49d8ef] | committer: Hugo Beauzée-Luyssen

chromecast: Don't reject buffering states

This would cause wrong timing to be used

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

 modules/stream_out/chromecast/chromecast_ctrl.cpp | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 1f2fbadf7d..5fc7c73c7e 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -423,17 +423,10 @@ void intf_sys_t::processMediaMessage( const castchannel::CastMessage& msg )
             {
                 if ( m_state != Buffering )
                 {
-                    if ( double(status[0]["currentTime"]) == 0.0 )
-                    {
-                        msg_Dbg( m_module, "Invalid buffering time, keep current state");
-                    }
-                    else
-                    {
-                        m_chromecast_start_time = (1 + mtime_t( double( status[0]["currentTime"] ) ) ) * 1000000L;
-                        msg_Dbg( m_module, "Playback pending with an offset of %" PRId64, m_chromecast_start_time);
-                        m_time_playback_started = VLC_TS_INVALID;
-                        setState( Buffering );
-                    }
+                    m_chromecast_start_time = (1 + mtime_t( double( status[0]["currentTime"] ) ) ) * 1000000L;
+                    msg_Dbg( m_module, "Playback pending with an offset of %" PRId64, m_chromecast_start_time);
+                    m_time_playback_started = VLC_TS_INVALID;
+                    setState( Buffering );
                 }
             }
             else if (newPlayerState == "PAUSED")



More information about the vlc-commits mailing list