GNOME Bugzilla – Bug 661098
[rtmp] need to initialize winsock 2 dll
Last modified: 2011-11-28 10:35:57 UTC
Make it work on win32 by calling WSAStartup and WSACleanup
Created attachment 198444 [details] [review] initialize and deinitialize winsock2
Review of attachment 198444 [details] [review]: I apllied the patch and rtmpsrc works now. Tested on MinGW.
Review of attachment 198444 [details] [review]: I doubt WSACleanup() should be called at all. Imagine another rtmpsrc element running in parallese in the same process as part of a different pipeline. It shouldn't be disrupted when another rtmpsrc element is finalized.
> I doubt WSACleanup() should be called at all. Imagine another rtmpsrc element > running in parallese in the same process as part of a different pipeline. It > shouldn't be disrupted when another rtmpsrc element is finalized. I think that's fine. From http://msdn.microsoft.com/en-us/library/aa916085.aspx: "There must be a call to WSACleanup for every successful call to WSAStartup made by a task. Only the final WSACleanup call for that task does the actual cleanup; the preceding calls simply decrement an internal reference count in the ws2.dll."
commit 26d6add9457f00ce8ec13844368466f0e3816e5d Author: Julien Isorce <julien.isorce@gmail.com> Date: Thu Oct 6 17:43:19 2011 +0200 rtmp: add WSAStartup and WSACleanup on Win32 https://bugzilla.gnome.org/show_bug.cgi?id=661098