On Thu, Jul 24, 2014 at 03:39:45PM +0200, Nicolas George wrote:
> This makes the FPS filter duplicate the last frame to take
> its duration into account, exactly like the other ones.
> 
> TODO find corresponding trac ticket(s).
> 
> Signed-off-by: Nicolas George <geo...@nsup.org>
> ---
>  libavfilter/vf_fps.c | 59 
> +++++++++++++++++++++++++++++++++++-----------------
>  1 file changed, 40 insertions(+), 19 deletions(-)
> 
> 
> Note: this will not work if there are filters before vf_fps, unless they
> are converted to accept messages and forward the end timestamp.
> When more filters are adapted, a warning could be added.
> 
> 
> diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
> index a38633d..7028f28 100644
> --- a/libavfilter/vf_fps.c
> +++ b/libavfilter/vf_fps.c
> @@ -28,6 +28,7 @@
>  #include <float.h>
>  #include <stdint.h>
>  
> +#include "libavutil/avassert.h"
>  #include "libavutil/common.h"
>  #include "libavutil/fifo.h"
>  #include "libavutil/mathematics.h"
> @@ -88,11 +89,13 @@ static av_cold int init(AVFilterContext *ctx)
>      return 0;
>  }
>  
> +/* FIXME: misnommer, the frames are discarded, not flushed */
>  static void flush_fifo(AVFifoBuffer *fifo)
>  {
>      while (av_fifo_size(fifo)) {
>          AVFrame *tmp;
>          av_fifo_generic_read(fifo, &tmp, sizeof(tmp), NULL);

> +        av_log(0, 16, "discard frame %d %ld\n", tmp->format, tmp->pts);
                  ^^^^^
this should be a proper context and named log level

rest should be ok if it works

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to