summaryrefslogtreecommitdiffstats
path: root/gst/rtsp
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtsp')
-rw-r--r--gst/rtsp/gstrtspsrc.c2
-rw-r--r--gst/rtsp/rtspconnection.c8
-rw-r--r--gst/rtsp/rtspdefs.c12
-rw-r--r--gst/rtsp/sdpmessage.c4
4 files changed, 20 insertions, 6 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index fc35f63b..6870c2f2 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -1425,7 +1425,7 @@ gst_rtspsrc_loop_udp (GstRTSPSrc * src)
GST_ELEMENT_WARNING (src, RESOURCE, READ, (NULL),
("Could not receive any UDP packets for %.4f seconds, maybe your "
"firewall is blocking it. Retrying using a TCP connection.",
- (gdouble) src->timeout / 1000000));
+ gst_guint64_to_gdouble (src->timeout / 1000000)));
/* we can try only TCP now */
src->cur_protocols = RTSP_LOWER_TRANS_TCP;
diff --git a/gst/rtsp/rtspconnection.c b/gst/rtsp/rtspconnection.c
index 69454069..1fb26bf5 100644
--- a/gst/rtsp/rtspconnection.c
+++ b/gst/rtsp/rtspconnection.c
@@ -238,12 +238,16 @@ rtsp_connection_send (RTSPConnection * conn, RTSPMessage * message)
gint towrite;
gchar *data;
+#ifdef G_OS_WIN32
+ WSADATA w;
+ int error;
+#endif
+
g_return_val_if_fail (conn != NULL, RTSP_EINVAL);
g_return_val_if_fail (message != NULL, RTSP_EINVAL);
#ifdef G_OS_WIN32
- WSADATA w;
- int error = WSAStartup (0x0202, &w);
+ error = WSAStartup (0x0202, &w);
if (error)
goto startup_error;
diff --git a/gst/rtsp/rtspdefs.c b/gst/rtsp/rtspdefs.c
index 6c96e1f4..413470ed 100644
--- a/gst/rtsp/rtspdefs.c
+++ b/gst/rtsp/rtspdefs.c
@@ -44,10 +44,12 @@
extern int h_errno;
-#include <netdb.h>
-
#include "rtspdefs.h"
+#ifndef G_OS_WIN32
+#include <netdb.h>
+#endif
+
static const gchar *rtsp_results[] = {
"OK",
/* errors */
@@ -217,7 +219,13 @@ rtsp_strresult (RTSPResult result)
res = g_strdup_printf (rtsp_results[idx], g_strerror (errno));
break;
case -RTSP_ENET:
+#ifndef G_OS_WIN32
res = g_strdup_printf (rtsp_results[idx], hstrerror (h_errno));
+#else
+ res =
+ g_strdup
+ ("not supported on win32, implement me in a different way ??");
+#endif
break;
case -RTSP_ELAST:
res = g_strdup_printf (rtsp_results[idx], result);
diff --git a/gst/rtsp/sdpmessage.c b/gst/rtsp/sdpmessage.c
index e7d2d7eb..1277bdc1 100644
--- a/gst/rtsp/sdpmessage.c
+++ b/gst/rtsp/sdpmessage.c
@@ -582,7 +582,9 @@ sdp_parse_line (SDPContext * c, gchar type, gchar * buffer)
case 'm':
{
gchar *slash;
- SDPMedia nmedia = {.media = NULL };
+ SDPMedia nmedia;
+
+ nmedia.media = NULL;
c->state = SDP_MEDIA;
sdp_media_init (&nmedia);