L'octidi 8 germinal, an CCXXIII, Carl Eugen Hoyos a écrit :
> -1 seems more correct to me.

-1 is never correct. On Linux (and apparently BSD too), -1 is
AVERROR(EPERM), definitely not what you want.

One libav guy suggested AVERROR_UNKNOWN; in FFmpeg we have AVERROR_EXTERNAL
"Generic error in an external library".

libz has a small list of error codes that can be mapped in a helper
function:

#define Z_STREAM_END    1 -> is this an error?
#define Z_NEED_DICT     2 -> is this an error?
#define Z_ERRNO        (-1) -> AVERROR(errno)
#define Z_STREAM_ERROR (-2) -> AVERROR_INVALIDDATA?
#define Z_DATA_ERROR   (-3) -> AVERROR_INVALIDDATA?
#define Z_MEM_ERROR    (-4) -> AVERROR(ENOMEM)?
#define Z_BUF_ERROR    (-5) -> AVERROR_BUFFER_TOO_SMALL?
#define Z_VERSION_ERROR (-6) -> AVERROR_BUG?

> Can this be reached?
> If yes, please print an error, if not, replace the 
> return with an assert.

I second that.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to