[FFmpeg-devel] [PATCH v2 2/3] libavfilter/vf_fps: Rewrite using activate callback

Calvin Walton calvin.walton at kepstin.ca
Tue Feb 20 22:22:53 EET 2018

I've found one minor problem with this patch. The actual functionality
is correct, as best I can tell, but the stats collection
(dropped/duplicated frames) will under-report dropped frames in my
testing. I'm going to rework the stats collection code a bit, but I
expect this to be a relatively minor change.

I'll post the updated patch later this week, so please let me know if
you have any other changes I should incorporate.


On Mon, 2018-02-19 at 19:54 -0500, Calvin Walton wrote:
> The old version of the filter had a problem where it would queue up
> all of the duplicate frames required to fill a timestamp gap in a
> single call to filter_frame. In problematic files - I've hit this in
> webcam streams with large gaps due to network issues - this will
> queue
> up a potentially huge number of frames. (I've seen it trigger the
> Linux
> OOM-killer on particularly large pts gaps.)
> This revised version of the filter using the activate callback will
> generate at most 1 frame each time it is called.
> ---
>  libavfilter/vf_fps.c | 383 ++++++++++++++++++++++++++---------------
> ----------
>  1 file changed, 199 insertions(+), 184 deletions(-)

More information about the ffmpeg-devel mailing list