[rtmpdump] [PATCH] Initialize winsock in librtmp
lrn1986 at gmail.com
Mon May 7 03:18:23 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
On 06.05.2012 20:57, Howard Chu wrote:
> LRN wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> subj is attached
>> Initializes winsock internally in librtmp (due to preservation
>> of RTMP_Init() interface application calls for InitSockets() are
>> retained, although a failure to initialize winsock 1.1 is pretty
>> much unheard of).
> Yes, but *why*? You haven't explained any motivation for your patch
> - what bug is there that your patch fixes?
Because it allows application to not to link to winsock libraries and
initialize them (even though application itself makes no direct use of
any of them).
> If an app only uses RTMP_Init/RTMP_Close, and nothing else touches
> winsock, and the app uses one RTMP handle at a time, then you will
> completely init and deinit the winsock library each time an RTMP
> handle is created/destroyed. That's a lot of useless churn, and
> fragments winsock's internal memory.
H-m-m-m...ok, what about using __attribute__ ((constructor)) and
((destructor)) to do initialization and de-initialization? I'm not
sure how constructors and destructors relate to DllMain.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the rtmpdump