[vlc-commits] chromecast: fix seek state in case of send error

Thomas Guillem git at videolan.org
Wed Feb 7 16:42:30 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Feb  7 16:38:08 2018 +0100| [530a3d20f39501ae14272e4f769e3f279c47819e] | committer: Thomas Guillem

chromecast: fix seek state in case of send error

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

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

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index ea6da6f734..66db9e7e83 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -928,10 +928,13 @@ bool intf_sys_t::requestPlayerSeek(mtime_t pos)
                   double( pos ) / 1000000.0 ) >= (int)sizeof(current_time) )
         return false;
 
-    m_communication.msgPlayerSeek( m_appTransportId, m_mediaSessionId, current_time );
-    setState( Seeking );
-
-    return true;
+    int ret = m_communication.msgPlayerSeek( m_appTransportId, m_mediaSessionId, current_time );
+    if( ret == VLC_SUCCESS )
+    {
+        setState( Seeking );
+        return true;
+    }
+    return false;
 }
 
 void intf_sys_t::setOnSeekDoneCb(on_seek_done_itf on_seek_done, void *on_seek_done_data)



More information about the vlc-commits mailing list