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

Baptiste Coudurier baptiste.coudurier at gmail.com
Fri Jun 24 02:11:19 CEST 2011

On 06/22/2011 11:58 AM, Erik Slagter wrote:
>>> Personally I don't mind having a few lines of code extra if it means
>>> the purpose of the code is clear at a glance. But I assume the ffmpeg
>>> devels try to squeeze out as much lines as possible ;-)
>> The purpose was actually to have fewer lines, such as keeping OPT_STR,
>> changing it to call opt_str which would look like
>> static int opt_str(...)
>> {
>> int ret = x264_param_parse(...)
>> switch(ret) {
>> case X264_PARAM_BAD_NAME: av_log(...); break;
>> case X264_PARAM_BAD_VALUE: av_log(...); break;
>> default: av_log(...); break;
>> }
>> return ret;
>> }
> I don't understand what you're trying to say here. The function you're
> describing here is functionally equivalent to my version.
> And yes, the goal of having fewer lines was clear to me, sorry if I
> didn't phrase it clearly. I just don't understand why lesser lines should
> always be a goal, especially when the source starts to look like assembly
> and the generated code is the same...

It's not about that. It's about coding style uniformity.

Key fingerprint          8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                           http://www.ffmpeg.org

More information about the ffmpeg-devel mailing list