On Thu, Feb 11, 2016 at 11:11:49PM +0100, Paul B Mahol wrote:
> Hi,
> 
> patch attached.

>  Makefile     |    2 
>  allfilters.c |    2 
>  f_loop.c     |  220 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 224 insertions(+)
> 9acd18c6b2dff1cc2c1b5d5e9cfcc94760a02821  0001-avfilter-add-loop-filters.patch
> From 1fd9636e9040b2a6b321cdd16ebd392c8db2de1b Mon Sep 17 00:00:00 2001
> From: Paul B Mahol <[email protected]>
> Date: Thu, 11 Feb 2016 22:05:54 +0100
> Subject: [PATCH] avfilter: add loop filters
> 
> Signed-off-by: Paul B Mahol <[email protected]>
[...]

> +static int push_frame(AVFilterContext *ctx)
> +{
> +    AVFilterLink *outlink = ctx->outputs[0];
> +    LoopContext *s = ctx->priv;
> +    int64_t pts;
> +    int ret;
> +
> +    AVFrame *out = av_frame_clone(s->frames[s->current_frame]);
> +
> +    if (!out)
> +        return AVERROR(ENOMEM);
> +    out->pts += s->duration - s->start_pts;

> +    pts = out->pts + out->pkt_duration;

[...]

> +            s->duration = frame->pts + frame->pkt_duration;

This shoudl use av_frame_get_pkt_duration()

    /**
     * duration of the corresponding packet, expressed in
     * AVStream->time_base units, 0 if unknown.
     * Code outside libavutil should access this field using:
     * av_frame_get_pkt_duration(frame)



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to