[vlc-devel] [PATCH] chromecast: don't start the playback when no stream can be sent
Steve Lhomme
robux4 at videolabs.io
Mon Jun 27 13:41:56 CEST 2016
---
modules/stream_out/chromecast/cast.cpp | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 290bdec..36f61c6 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -327,8 +327,19 @@ int sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
}
}
- /* tell the chromecast to load the content */
- p_intf->setHasInput( true, mime );
+ if ( !streams.empty() )
+ {
+ /* tell the chromecast to load the content */
+ p_intf->setHasInput( true, mime );
+ }
+ else
+ {
+ p_intf->requestPlayerStop();
+
+ sout_StreamChainDelete( p_out, NULL );
+ p_out = NULL;
+ sout = "";
+ }
}
return VLC_SUCCESS;
--
2.8.2
More information about the vlc-devel
mailing list