From 1db584485d8dbd21b1644336050a7ef912d87611 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robUx4@videolabs.io>
Date: Wed, 23 Dec 2015 12:58:45 +0100
Subject: [PATCH] chromecast: log when the Chromecast reports a launch error

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
---
 modules/stream_out/chromecast/chromecast_ctrl.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 9461bdc44982..d703ab7ce59b 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -329,6 +329,12 @@ void intf_sys_t::processMessage(const castchannel::CastMessage &msg)
 
             }
         }
+        else if (type == "LAUNCH_ERROR")
+        {
+            json_value reason = (*p_data)["reason"];
+            msg_Err(p_stream, "Failed to start the MediaPlayer: %s",
+                    (const char *)reason);
+        }
         else
         {
             msg_Err(p_stream, "Receiver command not supported: %s",
-- 
GitLab