[vlc-commits] chromecast: reload the file if the previous LOAD was canceled

Steve Lhomme git at videolan.org
Fri Aug 5 16:14:00 CEST 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Aug  4 18:56:45 2016 +0200| [c91be47cc7a6965573e2adcea86fd6f786b80050] | committer: Jean-Baptiste Kempf

chromecast: reload the file if the previous LOAD was canceled

It happens when we STOP the previous file that was in BUFFERING state, the
next LOAD command always gets canceled.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/stream_out/chromecast/chromecast_ctrl.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 4d3b9f3..c39fe27 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -536,6 +536,7 @@ void intf_sys_t::processMessage(const castchannel::CastMessage &msg)
             vlc_mutex_locker locker(&lock);
             receiver_state oldPlayerState = receiverState;
             std::string newPlayerState = status[0]["playerState"].operator const char *();
+            std::string idleReason = status[0]["idleReason"].operator const char *();
 
             if (newPlayerState == "IDLE")
                 receiverState = RECEIVER_IDLE;
@@ -641,7 +642,7 @@ void intf_sys_t::processMessage(const castchannel::CastMessage &msg)
                 vlc_cond_signal( &seekCommandCond );
             }
 
-            if ( cmd_status != CMD_LOAD_SENT && receiverState == RECEIVER_IDLE && has_input )
+            if ( (cmd_status != CMD_LOAD_SENT || idleReason == "CANCELLED") && receiverState == RECEIVER_IDLE && has_input )
             {
                 msg_Dbg( p_module, "the device missed the LOAD command");
                 i_ts_local_start = VLC_TS_0;



More information about the vlc-commits mailing list