[FFmpeg-devel] [PATCH v3] avfilter/vf_fps: fix duration

Nicolas George george at nsup.org
Thu Jun 15 21:00:31 EEST 2017


Le quintidi 25 prairial, an CCXXV, Thomas Mundt a écrit :
> Patch attached. This fixes ticket #2674. I inserted a FIXME message as a
> reminder.
> Please comment.

I am sorry to say I do not like it. The timestamp computation code in
vf_fps is already quite complex, and this patch is making it more
complex, introducing frames_in_proc which should not be needed just to
fix the last timestamp, and obviously the EOF handling duplicates the
filter_frame() logic.

Rule of thumb: if you are about to copy-paste a non-trivial block of
code, stop and refactor.

I think the way forward for this filter is to rewrite the core logic
using the activate() design. It should be much simpler since the
framework already handles a FIFO. If you are interested in it, you
probably will need to rebase push this series:

https://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209678.html

and use the attached patch.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-lavfi-add-ff_inlink_query_fifo.patch
Type: text/x-diff
Size: 1789 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170615/4490ac33/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170615/4490ac33/attachment.sig>


More information about the ffmpeg-devel mailing list