[vlc-commits] Chromecast: fix connection on Windows

Jean-Baptiste Kempf git at videolan.org
Fri Nov 7 15:29:48 CET 2014


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Nov  7 12:57:07 2014 +0100| [4059c0e628b623ff0277460dd4b67ff77bac41bd] | committer: Jean-Baptiste Kempf

Chromecast: fix connection on Windows

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

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

 modules/stream_out/chromecast/cast.cpp |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index b26c263..68e44da 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -932,7 +932,11 @@ static void* chromecastThread(void* p_data)
         canc = vlc_savecancel();
         // Not cancellation-safe part.
 
+#if defined(_WIN32)
+        if ((i_ret < 0 && WSAGetLastError() != WSAEWOULDBLOCK) || (i_ret == 0))
+#else
         if ((i_ret < 0 && errno != EAGAIN) || i_ret == 0)
+#endif
         {
             msg_Err(p_stream, "The connection to the Chromecast died.");
             vlc_mutex_locker locker(&p_sys->lock);
@@ -958,7 +962,11 @@ static void* chromecastThread(void* p_data)
         if (!p_sys->messagesToSend.empty())
         {
             i_ret = sendMessages(p_stream);
+#if defined(_WIN32)
+            if ((i_ret < 0 && WSAGetLastError() != WSAEWOULDBLOCK) || (i_ret == 0))
+#else
             if ((i_ret < 0 && errno != EAGAIN) || i_ret == 0)
+#endif
             {
                 msg_Err(p_stream, "The connection to the Chromecast died.");
                 vlc_mutex_locker locker(&p_sys->lock);



More information about the vlc-commits mailing list