After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661098 - [rtmp] need to initialize winsock 2 dll
[rtmp] need to initialize winsock 2 dll
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-06 15:50 UTC by Julien Isorce
Modified: 2011-11-28 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initialize and deinitialize winsock2 (3.08 KB, patch)
2011-10-06 15:51 UTC, Julien Isorce
committed Details | Review

Description Julien Isorce 2011-10-06 15:50:30 UTC
Make it work on win32 by calling WSAStartup and WSACleanup
Comment 1 Julien Isorce 2011-10-06 15:51:32 UTC
Created attachment 198444 [details] [review]
initialize and deinitialize winsock2
Comment 2 Dmitry Shatrov 2011-11-23 16:57:52 UTC
Review of attachment 198444 [details] [review]:

I apllied the patch and rtmpsrc works now. Tested on MinGW.
Comment 3 Dmitry Shatrov 2011-11-25 11:10:23 UTC
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.
Comment 4 Tim-Philipp Müller 2011-11-25 11:17:12 UTC
> 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."
Comment 5 Tim-Philipp Müller 2011-11-28 10:35:46 UTC
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