[Ffmpeg-devel] BeOS cleanup work in progress

François Revol revol
Wed Jan 24 18:05:51 CET 2007


> > So many return -EFOO...
> > there are also 5 of them in libavcodec, but we don't have AVERROR_*
> > there, should I just return -1 or move them here ?
> 
> id say move

Moved the defs to avcodec.h

> also the actual values of the error returns must not change or you 
> must
> increase the major version number of all libs, and increasing that 
> needs
> some more disscussions on ffmpeg-dev first

I didn't changed the values, only added some more.
Sane code should check for <0 anyway so should work unchanged.
I actually expect lots of unattended crashes in VLC in BeOS to disapear 
with this fix :D
There are lots or return -1 still, but that's not a problem.

> 
> and there is some code duplication in the patch which has to be 
> removed
> (yes the E* -> AVERROR_* mapping swiches)

I originally wrote a func for that, but there were only 2...
Did a static func in avcodec.h
Also added av_errno_from_averror() for apps to convert to something 
others can use or print with strerror().

Btw, I checked what opengroup says about errno...
All pages only state errors are non-zero, then on the page for errno.h 
it states they are supposed to be positive, but they changed that to 
comply with some C99 thingy... So originally they weren't supposed to 
be positive.
There is no way to revert that in BeOS anyway, whatever CNNNN says.
Besides it's way more logical if you think about it.

Fran?ois.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070124/7692bd39/attachment.asc>



More information about the ffmpeg-devel mailing list