[FFmpeg-devel] Detecting invalid filter parameters

Paul B Mahol onemda at gmail.com
Wed Dec 9 20:45:16 CET 2015


On 12/9/15, Jean Delvare <jdelvare at suse.de> wrote:
> Hi FFmpeg developers,
>
> The delogo video filter currently doesn't check the logo area passed as
> parameters for validity. If the logo area is partly outside of the
> frame or inside but too close to the border, the code will silently
> trim the area to make it fit inside the frame, then go on, with
> undesirable results.
>
> I would like to add a check for the delogo filter parameters to ensure
> that there is enough frame room around the area to execute the
> algorithm.
>
> My question is: do I have to do this check in filter_frame() for every
> frame, or can I do it once in init() and be done with it? Or is it
> supposed to be done in config_props()? I read the documentation about
> config_props but I'm afraid it did not really enlightened me as to what
> this callback is for. For performance reasons I'd like to avoid
> performing the same check repeatedly.
>
> Sorry if this sounds like a newbie question but well I guess that's
> what I am. I'm still not sure what is the difference between filter
> links and pads (or more generally what pads are)...

If filter doesn't support midstream resolution changes than its ok
to do it in config_props for one of input or output pads.

>
> Thanks,
> --
> Jean Delvare
> SUSE L3 Support
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list