[FFmpeg-devel] r22718 in libavformat/rtsp.c uses non-portable errno

Ronald S. Bultje rsbultje
Tue Apr 6 15:51:58 CEST 2010


Hi,

On Tue, Apr 6, 2010 at 9:49 AM, Martin Storsj? <martin at martin.st> wrote:
> On Tue, 6 Apr 2010, Ronald S. Bultje wrote:
>> On Tue, Apr 6, 2010 at 9:41 AM, Martin Storsj? <martin at martin.st> wrote:
>> > This hardcodes the assumption that AVERROR(x) == -x, would it better to
>> > include it in the defines for windows, too, or is there any technical
>> > reason not to?
>>
>> Yeah, because it's only Windows, and there it's always positive.
>
> Yes, but would it still work in this form?
>
> #define ff_neterrno() AVERROR(WSAGetLastError())
> #define FF_NETERROR(err) AVERROR(WSA##err)
>
> That'd be more obvious imo...

Well, there's no reason why the sign of EXYZ would be related to the
sign of WSAEXYZ, so I'd need to write a new macro anyway for
WSA-specific codes.

Ronald



More information about the ffmpeg-devel mailing list