[Ffmpeg-devel] FFMPEG RTSP for Windows
Thu Mar 30 13:26:52 CEST 2006
>> On Wed, Mar 29, 2006 at 03:52:20PM -0600, Michael A. Kohn wrote:
>>>>> I don't know anything about Winsock, but go ahead and send
>>>>> patches for any improvements you make. Send unified diffs: 'diff
>>>>> -Naur' or 'cvs
>>>>> -u'. If they're good changes then the patches ought to be
>>> One important thing is kinda missing from this. The Winsock library
>>> has to be intialized before it can be used. At the top of my test
>>> program I have something like this:
>>> WSADATA wsaData;
>>> WORD wVersionRequested=MAKEWORD(1,1); int Win32isStupid;
>>> Win32isStupid=WSAStartup(wVersionRequested, &wsaData);
>>> if (Win32isStupid) return -1;
>> This code does not give me much confidence in your knowledge of the C
>> language. The above can be done without useless temp vars:
>> WSADATA dummy;
>> if (WSAStartup(MAKEWORD(1,1), &dummy)) return 1;
>> and I assume MAKEWORD(1,1) is just 0x0101..
>> BTW your variable name is misleading. It suggests that the function
>> should always return -1... :)
> Hmm is it reentrant or can must it only be called once ?
The function must be called at least once per process using sockets, though
may be called multiple times without problem.
MSDN "man" page:
> How can an app using libav* possibly know it has to init winsock ?
It shouldn?t need too. And as such the init function should be transparently
called by the underlying library unconditionally on startup or when any
network operations will occur.
> That sucks :) Just get a real OS :p
That?s the prefered option.
More information about the ffmpeg-devel