[FFmpeg-devel] [PATCHv2] add signature filter for MPEG7 video signature

Hendrik Leppkes h.leppkes at gmail.com
Sat Apr 16 12:49:56 CEST 2016

On Sat, Apr 16, 2016 at 12:43 PM, Gerion Entrup
<gerion.entrup.ffdev at flump.de> wrote:
>> ffmpeg -i matrixbench_mpeg2.mpg -vf signature=xml:filename=signature.xml -f null -
> I have already fixed a bunch of this segfault. The reason is always the same. init fails, the
> framework calls uninit and uninit segfaults because it try to use not existing pointers.
> I now introduced a variable that store the return value of init. I'm not very happy with
> this solution. A much cleaner way would be to split uninit in a function "uninit" that only does
> the cleanup and a function "call_me_after_all_filter_frames_but_before_uninit" for postprocessing
> stuff (and the last function is only called if init was successful). Does such a function exist?

Why can't your code verify that things are valid before you try to use
them, instead of segfaulting or clunky variables to track a state?
It seems rather fragile this way.

- Hendrik

More information about the ffmpeg-devel mailing list