Original commit message from CVS:
Patch by: Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init),
(gst_rtspsrc_finalize):
Call WSAStartup() and WSACleanup before using the Winsock API.
See #520808.
+2008-03-17 Wim Taymans <wim.taymans@collabora.co.uk>
+
+ Patch by: Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
+
+ * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init),
+ (gst_rtspsrc_finalize):
+ Call WSAStartup() and WSACleanup before using the Winsock API.
+ See #520808.
+
2008-03-16 Stefan Kost <ensonic@users.sf.net>
* gst/avi/gstavidemux.c:
#include "gstrtspsrc.h"
+#ifdef G_OS_WIN32
+#include <winsock2.h>
+#endif
+
GST_DEBUG_CATEGORY_STATIC (rtspsrc_debug);
#define GST_CAT_DEFAULT (rtspsrc_debug)
static void
gst_rtspsrc_init (GstRTSPSrc * src, GstRTSPSrcClass * g_class)
{
+#ifdef G_OS_WIN32
+ WSADATA wsa_data;
+
+ if (WSAStartup (MAKEWORD (2, 2), &wsa_data) != 0) {
+ GST_ERROR_OBJECT (src, "WSAStartup failed: 0x%08x", WSAGetLastError ());
+ }
+#endif
+
src->location = g_strdup (DEFAULT_LOCATION);
src->url = NULL;
g_static_rec_mutex_free (rtspsrc->conn_rec_lock);
g_free (rtspsrc->conn_rec_lock);
+#ifdef G_OS_WIN32
+ WSACleanup ();
+#endif
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}