[rtmpdump] [PATCH] Initialize winsock in librtmp

Howard Chu hyc at highlandsun.com
Sun May 6 18:57:43 CEST 2012


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?

The patch doesn't actually improve anything. It doesn't save calling apps from 
having to call WSAStartup/WSACleanup on their own. 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.

Give a good reason why anybody should spend their time reading your patches, 
otherwise they're worthless.


More information about the rtmpdump mailing list