On Mon, May 14, 2012 at 01:53:53PM +0200, Robert Nagy wrote:
> I have changed the solution to a simpler variant, that also provides
> correct pts for the last frame.

> --- a/libavfilter/vf_yadif.c
> +++ b/libavfilter/vf_yadif.c
> @@ -61,6 +61,7 @@ typedef struct {
>  
>      const AVPixFmtDescriptor *csp;
> +    bool eof;

I haven't seen the bool type used anywhere else in libav.

> @@ -301,10 +302,22 @@ static int request_frame(AVFilterLink *link)
>  
> -        if ((ret = avfilter_request_frame(link->src->inputs[0])))
> +        int ret = avfilter_request_frame(link->src->inputs[0]);
> +
> +        if (ret == AVERROR_EOF && yadif->next) {
> +            auto next = avfilter_ref_buffer(yadif->next, AV_PERM_READ);
> +            next->pts = yadif->next->pts * 2 - yadif->cur->pts;
> +
> +            parallel_yadif_start_frame(link->src->inputs[0], next);
> +            parallel_yadif_end_frame(link->src->inputs[0]);
> +            yadif->eof = true;
> +        }
> +        else if (ret < 0) {
>              return ret;
> +        }

Again: else on the same line as '}'

> @@ -404,7 +417,7 @@ static av_cold int init(AVFilterContext *ctx, const char 
> *args, void *opaque)
>  
>  static int out_config_props(AVFilterLink* link)
> -{    
> +{
>      link->time_base.num = link->src->inputs[0]->time_base.num;
> @@ -433,7 +446,7 @@ AVFilter avfilter_vf_yadif = {
>      .outputs   = (AVFilterPad[]) {{ .name             = "default",
>                                      .type             = AVMEDIA_TYPE_VIDEO,
>                                      .poll_frame       = poll_frame,
> -                                    .request_frame    = request_frame, 
> +                                    .request_frame    = request_frame,

These are unrelated changes and they do not apply to libav HEAD, making
this patch impossible to commit to libav HEAD.  Please always look at
your patches before sending and make sure they contain no unrelated
changes.

Judging from the nature of the changes, removing trailing whitespace,
it looks like you wanted to either squash some commits or discard
changes from a previous commit, but did not do it quite correctly.
Find me on IRC to lend you a helping hand with git.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to