[FFmpeg-devel] [PATCH] Redefine AVERROR_EOF as a specific FFmpeg error code at the next lavu major bump

Michael Niedermayer michaelni
Sun Apr 4 04:05:23 CEST 2010


On Sun, Apr 04, 2010 at 12:20:43AM +0200, Stefano Sabatini wrote:
> On date Saturday 2010-04-03 22:03:23 +0200, Michael Niedermayer encoded:
> > On Sat, Apr 03, 2010 at 05:08:48PM +0200, Stefano Sabatini wrote:
> [...]
> > > Regression test passed (both with LIBAVUTIL_MAJOR_VERSION == 50 and ==
> > > 51).
> > 
> > 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
> 
> /* the jackasses changed the error codes, so I need to build a
>  * backward compatibility layer */
> #if LIBFOO_VERSION < NEXT && LIBAVUTIL_VERSION_MAJOR > 50
> #define FOO_GET_AV_ERROR_CODE(err) (err == AVERROR_EOF         ? AVERROR(EPIPE ) : \
>                                     err == AVERROR_NUMEXPECTED ? AVERROR(EDOM)   : \
>                                     err == AVERROR_INVALIDDATA ? AVERROR(EINVAL) : err)
> #else
> #define FOO_GET_AV_ERROR_CODE(err) (err)
> #endif
> 
> 
> I'm not saying that's nice, but at least it is possible.

given the interresting cases ive seen with several shared libs and
dependancies amongth them i doubt anyone will come up with a variant
that works


> Also keeping
> garbage forever for the fear to break applications is not good.

where did i put the tar and feathers?


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100404/43c36b54/attachment.pgp>



More information about the ffmpeg-devel mailing list