[FFmpeg-devel] [PATCH 2/2] lavf: replace ETIMEDOUT by AVERROR_TIMEOUT

Nicolas George nicolas.george at normalesup.org
Tue Sep 4 18:20:18 CEST 2012

Le nonidi 19 fructidor, an CCXX, Michael Niedermayer a écrit :
> ETIMEDOUT is not available on all systems and defining it in an internal
> header to something does not help external applications interpreting the
> error code. Thus its better we use our own error code, that can be used
> everywhere.

Beware, on systems where ETIMEDOUT exists, it is a possible value for errno,
so ff_neterrno() = AVERROR(errno) can return it. Therefore, ff_neterrno must
be changed too, maybe something like that:

static inline int ff_neterrno(void)
    switch (errno) {
    default:        return AVERROR(errno);

(or maybe not inline)


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120904/73e4007d/attachment.asc>

More information about the ffmpeg-devel mailing list