[rtmpdump] [PATCH] Initialize winsock in librtmp

LRN lrn1986 at gmail.com
Mon May 7 03:18:23 CEST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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/

iQEcBAEBAgAGBQJPpyLeAAoJEOs4Jb6SI2CwAPAH+wZ+8ofYeuo0Ge457RNZn3d0
wZQmsLIC+foCYmJOqizOIVj+IvsYxwlvKgGlpzPHJQsNaBsxTeqA0OKXJBZAjoKi
6bxulxV20A1TK3RPkDj6caDT0FiUhmyhTDn8M3uaSPlsCl/7zCNHz6aL0oIgEWxO
VOkFMeFSTaGoYCym6kOaEwY9XrO6RirTlERUCtAdKSqB6JHGFg3caLh2/ArEeAXQ
CDEAc/mu2d4PFhRIUlNGkG6wJvACw6tBd2IKlfVYA1u7fy6Z9wZ/yRFC4mSSheBP
npn4/faak/dcn9bJAy29/2/Kf+L1GckNV5bYksnurjdxjpW86T6cNLFVu9JpqbU=
=tK9M
-----END PGP SIGNATURE-----


More information about the rtmpdump mailing list