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

Martin Storsjö martin
Tue Apr 6 15:41:46 CEST 2010


On Tue, 6 Apr 2010, Ronald S. Bultje wrote:

> On Tue, Apr 6, 2010 at 2:59 AM, Martin Storsj? <martin at martin.st> wrote:
> > On Sat, 3 Apr 2010, Ronald S. Bultje wrote:
> >> Does anyone mind if we make FF_NETERROR() wrap AVERROR()?
> >
> > There's a few occurrances in at least tcp.c (probably in udp.c and some
> > other places that deal directly with networking functions) that look like
> > this:
> >
> > ? ? ? ?if (ff_neterrno() == FF_NETERROR(EINTR))
> > ? ? ? ? ? ?goto redo;
> >
> > These would need to be adjusted accordingly if FF_NETERROR is changed.
> 
> OK, so I propose to change ff_neterrno() to return an AVERROR(). See attached.

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? Also, the rtsp change should of course be a separate commit 
:-)

// Martin



More information about the ffmpeg-devel mailing list