Hi, On Wed, Apr 20, 2011 at 8:57 AM, Anton Khirnov <[email protected]> wrote: > On Mon, 18 Apr 2011 13:35:48 +0200, Stefano Sabatini > <[email protected]> wrote: >> [adding libav-devel to recipients, as this concerns API/ABI compatibility] >> >> On date Saturday 2011-04-16 19:12:34 +0200, Nicolas George encoded: >> > Le septidi 27 germinal, an CCXIX, Stefano Sabatini a écrit : >> > > * implement AVERROR_EOF as a libav* specific error code, rather than >> > > mask the EPIPE POSIX error code which has a different semantics >> > > >> > > * implement AVERROR_INVALIDDATA as a libav* specific error code (already >> > > implemented but it was controversial), and fix the >> > > AVERROR(EINVAL)/AVERROR_INVALIDDATA conflict >> > >> > Seems reasonable. >> > >> > > * drop AVERROR_NUMEXPECTED (not very important, but I believe it is a >> > > too much specific error code, so I'd prefer to replace it with >> > > AVERROR(EINVAL) >> > >> > A more generic AVERROR_SYNTAX could be possible too. >> > >> > > |bumping it to 51 will changes the codes returned by all libs using >> > > libavutil >> > > |all of them would need to bump major. >> > > |i dont think this is reasonable, thus we should undo all error >> > > redefinitions >> > > |before they become real and debian burns you at the stake >> > > >> > > but I don't think this is a real issue (assuming that all the libav* >> > > major versions are bumped at the same time), and this is my argument: >> > >> > I think the point is precisely in your parentheses: changing the error >> > codes >> > requires bumping the major version for all the libraries, not just >> > libavutil. >> > >> >> > One thought in passing: If the error codes get changed, it may be a good >> > idea to adapt the definition of AVERROR(errno) to something like: >> > >> > #define AVERROR(e) (-(e) - 1) >> > >> > This would have the benefit that when some old piece of code returns -1 >> > instead of a meaningful error code, it would not displayed as "Permission >> > denied" or whatever errno code is 1 on this particular platform. >> >> I'd prefer to just return the negated POSIX error code, and avoid >> other weird mapping. >> >> Possibly we could introduce an AVERROR_GENERIC code and replace -1 >> with it, not that I like the idea too much. >> >> In attachment an updated patchset. > > The first three look sane to me, not sure about the point of the last, > but if you think it's better...
I don't think it's better TBH. Way too complex. Let's keep this stuff simple... Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
