[FFmpeg-devel] [PATCH] libavcodec/libx264.c: distinguish between x264 parameter errors

Etienne Buira etienne.buira.lists at free.fr
Fri Jun 24 11:31:57 CEST 2011


On Fri, Jun 24, 2011 at 11:16:54AM +0200, Erik Slagter wrote:
> ES>> I don't understand what you're trying to say here. The function you're
> ES>> describing here is functionally equivalent to my version.
> 
> EB> No, the one I describe doesn't (almost) invert x264_param_parse return
> EB> value.
> 
> Objection: It will print a warning even when the parameter is
> correct (ret == 0). That could be overcome by adding another case
> statement. Personally I don't like it this way because the caller

Yes, I forgot this case, that was just to express my idea (and to make
it clear my concern was not about coding style (that have to be adressed
anyway)).

> of opt_str shouldn't have any knowledge of what (library) functions
> opt_str calls and so it should get a simple "ok" or "not ok" and not
> the return value of a call to some other function, that might be
> replaced at any time.

Most functions in ffmpeg returns 0 on success (or positive), !=0 (resp. <0) otherwise.

> I understand this is mostly personal taste (differing from what's
> "common" here) but I really think this particular issue is really
> too trivial to fight about. Now if it were in a time-critical

I don't mean to fight, just tried to explain better a concern you didn't
understand.

> code path, but it clearly isn't.

Who ever talked about a performance issue in this thread?


More information about the ffmpeg-devel mailing list