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

Martin Storsjö martin
Tue Apr 6 08:59:32 CEST 2010


On Sat, 3 Apr 2010, Ronald S. Bultje wrote:

> On Sat, Apr 3, 2010 at 9:10 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> > On Sat, Apr 3, 2010 at 10:08 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> >> On Fri, Apr 2, 2010 at 6:51 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> >>> On Fri, Apr 2, 2010 at 5:15 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> >>>> Can the Windows / cygwin people please generate a patch against
> >>>> os_support.h to add this as a WSA define?
> >>>
> >>> Why is this not a network error?
> >>> - ? ? ? ? ? ?return AVERROR(ETIMEDOUT);
> >>> + ? ? ? ? ? ?return AVERROR(FF_NETERROR(ETIMEDOUT));
> >>
> >> Why isn't FF_NETERROR automatically an AVERROR?
> >
> > I don't know. This is how it's done above in:
> > ? ? ? ?if (lower_transport_mask == 0 && err == 1) {
> > ? ? ? ? ? ?err = AVERROR(FF_NETERROR(EPROTONOSUPPORT));
> > ? ? ? ? ? ?goto fail;
> > ? ? ? ?}
> 
> 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.

// Martin



More information about the ffmpeg-devel mailing list