[FFmpeg-devel] [PATCH 2/2] avcodec/snowenc: Replace "return -1" by named constants

James Almer jamrial at gmail.com
Mon Sep 25 02:16:28 EEST 2017

On 9/24/2017 8:06 PM, Carl Eugen Hoyos wrote:
> 2017-09-23 3:14 GMT+02:00 James Almer <jamrial at gmail.com>:
>> On 9/22/2017 10:01 PM, Michael Niedermayer wrote:
>>> +        if((ret = ff_rate_control_init(&s->m)) < 0)
>>> +            return ret;
>> ret = foo();
>> if (ret < 0)
>>     return ret;
>> No more combined assignment and comparisons for
>> new code if possible. It's too prone to mistakes.
> This comment looks strange given today's patches from you.
> Carl Eugen

You mean the patch where i did a sed replace of a function name in code
that existed beforehand? I don't think it's the same as manually adding
a brand new case of assignment and comparison in one statement.

Do you want me to split those lines before i push the patch? Guess it
would kill two birds with one stone, so probably worth it.

More information about the ffmpeg-devel mailing list