Commit 034ce48d authored by Francois Cartegnie's avatar Francois Cartegnie

sout: chromecast: close connection on load failure

only msgClose won't stop listening, so we need to
flag as CONN_DEAD as well so it will send the close
message and exit thread
parent 919850d1
...@@ -673,7 +673,9 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag ...@@ -673,7 +673,9 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
case CHROMECAST_MEDIA_LOAD_SENT: case CHROMECAST_MEDIA_LOAD_SENT:
msg_Warn(p_stream, "app is no longer present. closing"); msg_Warn(p_stream, "app is no longer present. closing");
msgClose(p_stream, p_sys->appTransportId); msgClose(p_stream, p_sys->appTransportId);
i_ret = -1; vlc_mutex_lock(&p_sys->lock);
p_sys->i_status = CHROMECAST_CONNECTION_DEAD;
vlc_mutex_unlock(&p_sys->lock);
// ft // ft
default: default:
break; break;
...@@ -706,6 +708,10 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag ...@@ -706,6 +708,10 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
{ {
msg_Err(p_stream, "Media load failed"); msg_Err(p_stream, "Media load failed");
atomic_store(&p_sys->ab_error, true); atomic_store(&p_sys->ab_error, true);
msgClose(p_stream, p_sys->appTransportId);
vlc_mutex_lock(&p_sys->lock);
p_sys->i_status = CHROMECAST_CONNECTION_DEAD;
vlc_mutex_unlock(&p_sys->lock);
} }
else else
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment