[Ffmpeg-devel] BeOS cleanup work in progress
Thu Jan 25 09:53:42 CET 2007
> > > 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
> i do not agree with these functions in avcodec.h, i also do not agree
> moving them into libavutil as its IMO bloat from libavutils point of
Someone argued there was code dup in libavformat/tcp.c (2 occurences,
So I factored it out there in the first one.
So please make your mind :D
As for which lib they go into, well there were several return -EFOO in
libavcodec as well. And someone suggested moving errors there.
I can move that back to avformat, and change others to return -1.
I don't care as long as it's not those ugly -EFOO.
> and last but not least they of course MUST NOT be static in a header
> as that would duplicate them in the object files, now iam curious if
> are needed at all ...
I just did as other funcs in the header were and was probably asleep.
Though, the 2nd one would probably not be of use to apps if it's
Making them inline would probably be better.
> > Also added av_errno_from_averror() for apps to convert to something
> > others can use or print with strerror().
> rejected, this has nothing to do with changing E* -> AVERROR_*
That one isn't strictly required, I just added it as a convenience for
applications which might want to make sense of our error codes to
itself or the system (other apps) or display plain text messages.
Using strerror(av_error_from_errno(e)) has the added value of being
already localized I think.
But I can drop that if you want.
> [confgure stuff i dont maintain]
> > +#define AVERROR_TRYAGAIN (-11) /* busy at the moment... */
> ok, but please change the comments to doxygen compatible ones /**< i
> think */
> note, this can be done in a seperate patch/commit if you like
I didn't change a thing in the comments, but I can add that I suppose.
> > - return errno;
> > + return av_error_from_errno(errno);
> hmm this should be a AVERROR_NOMEM i think? if so it should
> be changed in a seperate commit before the other AVERROR stuff
No idea, I didn't write that code.
More information about the ffmpeg-devel