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

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Sep 25 02:06:16 EEST 2017


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


More information about the ffmpeg-devel mailing list