[vlc-commits] chromecast: reset state only when retrying

Thomas Guillem git at videolan.org
Thu Mar 29 14:04:15 CEST 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 29 10:13:52 2018 +0200| [96c18ad9c3d627bb30c16282122ce818d1ba02bd] | committer: Thomas Guillem

chromecast: reset state only when retrying

(cherry picked from commit aea0e78e43ca962cc1ea18b15b76ad46bc1ac965)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

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

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 4f7dc18ffb..052d51d3f8 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -463,10 +463,11 @@ int intf_sys_t::pace()
         return CC_PACE_OK_ENDED;
     else if( isStateError() || m_state == Stopped )
     {
-        States error_state = m_state;
-        m_state = Ready;
-        if( error_state == LoadFailed && m_retry_on_fail )
+        if( m_state == LoadFailed && m_retry_on_fail )
+        {
+            m_state = Ready;
             return CC_PACE_ERR_RETRY;
+        }
         return CC_PACE_ERR;
     }
 



More information about the vlc-commits mailing list