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

Thomas Guillem git at videolan.org
Wed Feb 7 23:45:55 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Feb  7 16:38:08 2018 +0100| [15b6083a908d42fb3b10177c621d394aee76582f] | committer: Jean-Baptiste Kempf

chromecast: fix seek state in case of send error

(cherry picked from commit 530a3d20f39501ae14272e4f769e3f279c47819e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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