[FFmpeg-devel] Collection of patches

Thorsten Jordan tjordan
Thu Apr 24 13:48:27 CEST 2008


Benoit Fouet schrieb:
> Thorsten Jordan wrote:
>> sorry, my mistake, here is a version with all things fixed, it compiles
>> also (should have checked before)
>>
>> +    /* Pixel aspect ratio setting */
>> +    if (avctx->sample_aspect_ratio.num < 1 || avctx->sample_aspect_ratio.num > 255 ||
>> +        avctx->sample_aspect_ratio.den < 1 || avctx->sample_aspect_ratio.den > 255) {
>> +        av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i\n",
>> +            avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den);
>> +            return -1;
>>   
> 
> weird indentation
how would you like it to be? "||" on next line? second line indented
less than four?
or would

if (   avctx->sample_aspect_ratio.num < 1 || ...
    || avctx->sample_aspect_ratio.den < 1 || ...
    av_log(...

be better?

or place the { below the if?

checking the libavcodec source tree doesn't give a good hint, as there
are many different styles...

-- 
Regard, Thorsten




More information about the ffmpeg-devel mailing list