[Ffmpeg-devel] BeOS cleanup work in progress

François Revol revol
Thu Jan 18 18:45:36 CET 2007


> On Sat, Jan 13, 2007 at 03:47:41PM +0100, Fran?ois Revol wrote:
> > just for the record so you see I didn't forget
> > http://revolf.free.fr/beos/patches/beos_cleanup.001.diff
> > Not finished yet, but it's the most blatant ones.
> 
> At a glance this is looking very good, thanks for tackling the issue.
> Commit it as soon as you can, it's a major cleanup.
> 

commited. Hope it didn't break the build :D

Now, I need to fix all those return -ESOMETHING;
It is plain wrong to assume errors are positive. 
It's false under BeOS at least:
#define B_GENERAL_ERROR_BASE  LONG_MIN
#define B_POSIX_ERROR_BASE    B_GENERAL_ERROR_BASE + 0x7000
#define E2BIG                 (B_POSIX_ERROR_BASE + 1)
Until now the beos build used a hack to redefine those codes to be 
positive, but that means they weren't recognized correctly then when 
checked against errno, so it just fixed the build, not the code.

I know it's an usual shortcut in unixish code but it's definitely not 
portable.

Besides, there are several AVERROR codes defined that just wait to be 
used.
I'll probably expand the list a bit and use an inlined func to convert 
to it from errno.

Btw, there are 5 or 6 of those in libavcodec, but AVERROR_* are in 
libavformat... Either I'll change them to -1 or move AVERROR_ there, 
comments ?

Fran?ois.




More information about the ffmpeg-devel mailing list