vlc | branch: master | Steve Lhomme <[email protected]> | Mon Jun 27 13:41:56 
2016 +0200| [80fb9f7f3b883f02fca2d1ee099ec355faf7794a] | committer: 
Jean-Baptiste Kempf

chromecast: don't start the playback when no stream can be sent

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 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 42f6c9e..989ab4a 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;

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to