Commit 76fbca71 authored by Ole Andre Vadla Ravnaas's avatar Ole Andre Vadla Ravnaas Committed by Wim Taymans
Browse files

gst/udp/gstudpsrc.c: Properly balance WSA_Cleanup with WSA_Startup.

Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>
* gst/udp/gstudpsrc.c: (gst_udpsrc_finalize), (gst_udpsrc_start),
(gst_udpsrc_stop):
Properly balance WSA_Cleanup with WSA_Startup.
Also make the poll controllable on windows. Fixes #520888.
parent 1e61eb7e
2008-03-07 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
* gst/udp/gstudpsrc.c: (gst_udpsrc_finalize), (gst_udpsrc_start),
(gst_udpsrc_stop):
Properly balance WSA_Cleanup with WSA_Startup.
Also make the poll controllable on windows. Fixes #520888.
2008-03-06 Wim Taymans <wim.taymans@collabora.co.uk> 2008-03-06 Wim Taymans <wim.taymans@collabora.co.uk>
   
* gst/matroska/ebml-read.c: (gst_ebml_read_peek_bytes), * gst/matroska/ebml-read.c: (gst_ebml_read_peek_bytes),
......
...@@ -326,6 +326,8 @@ gst_udpsrc_finalize (GObject * object) ...@@ -326,6 +326,8 @@ gst_udpsrc_finalize (GObject * object)
g_free (udpsrc->multi_group); g_free (udpsrc->multi_group);
g_free (udpsrc->uri); g_free (udpsrc->uri);
WSA_CLEANUP (src);
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (parent_class)->finalize (object);
} }
...@@ -759,13 +761,8 @@ gst_udpsrc_start (GstBaseSrc * bsrc) ...@@ -759,13 +761,8 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
src->myaddr.sin_port = htons (src->port + 1); src->myaddr.sin_port = htons (src->port + 1);
#ifdef G_OS_WIN32
if ((src->fdset = gst_poll_new (GST_POLL_MODE_AUTO, FALSE)) == NULL)
goto no_fdset;
#else
if ((src->fdset = gst_poll_new (GST_POLL_MODE_AUTO, TRUE)) == NULL) if ((src->fdset = gst_poll_new (GST_POLL_MODE_AUTO, TRUE)) == NULL)
goto no_fdset; goto no_fdset;
#endif
gst_poll_add_fd (src->fdset, &src->sock); gst_poll_add_fd (src->fdset, &src->sock);
gst_poll_fd_ctl_read (src->fdset, &src->sock, TRUE); gst_poll_fd_ctl_read (src->fdset, &src->sock, TRUE);
...@@ -877,8 +874,6 @@ gst_udpsrc_stop (GstBaseSrc * bsrc) ...@@ -877,8 +874,6 @@ gst_udpsrc_stop (GstBaseSrc * bsrc)
src->fdset = NULL; src->fdset = NULL;
} }
WSA_CLEANUP (src);
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment