[FFmpeg-devel] [PATCH] delogo filter: new "uglarm" interpolation mode added

Uwe Freese uwe.freese at gmx.de
Thu Dec 27 23:02:37 EET 2018


Hello,

Am 27.12.18 um 20:25 schrieb Carl Eugen Hoyos:
>
>> I have now added as error handling:
>>
>> av_log(inlink->src, AV_LOG_ERROR, "More planes in frame than expected.\n");
>> return AVERROR(ENOMEM);
>>
>> Is this ok, or how should this be implemented instead?
> Not sure I understand: How can plane get >= MAX_PLANES?
> If this is impossible (as I believe), please use av_assert0().

I meant the use of "ENOMEM" and if there's a better error constant to 
use here.

At this line, the error is not about memory, but that the video input 
format is unexpected. Maybe there is a better value to use here. I 
didn't find where these error constants are defined.

> Please use av_freep() instead of av_free() for non-local
> variables (the parameter needs an additional "&").

The doc said that av_freep was recommended, but I thought, when I call 
av_free at uninit, the possibility that a dangling reference is used is 
zero.

OK, no problem, I can change this in the next version (tomorrow). But if 
av_freep should be used "everywhere", maybe the docs should also be 
changed? At least it wasn't clear to me that even in uninit, av_freep 
would be preferred.

Regards,
Uwe


More information about the ffmpeg-devel mailing list