[FFmpeg-devel] [PATCH] Undefined standard error numbers (was: Make libavformat/url_open print an error message in case of unrecognized protocol string)

Michael Niedermayer michaelni
Sun Dec 2 00:32:34 CET 2007

On Thu, Nov 29, 2007 at 01:16:55PM -0200, Ramiro Ribeiro Polla wrote:
> Hello,
> Stefano Sabatini wrote:
>> By the way, we should somehow fix the avcodec.h AVERROR_ mess.
> Attached patch is a suggestion for the undefined standard error numbers in 
> some systems: leave it up to the user to define it.
> Or maybe is it more appropriate to add $ifndef #define workarounds in 
> libossupport once it gets in SVN?

i think libossupport is the better place
but #ifndef #define is almost certainly not a good idea as it can lead
to very hard to debug problems if the availability of EFOOBAR differes
between ffmpeg and the application using it

the #defines should be decided during libossupport install/compile time,
preferably with a maximum of sanity checking

that is put #defines for the missing errnos in a header of ossupport like:

#if defined(EFOOBAR) && EFOOBAR != -123
#error EFOOBAR was not available during libossupport install and is now
#error available with a different value
#define EFOOBAR -123

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- 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/20071202/8d98c833/attachment.pgp>

More information about the ffmpeg-devel mailing list