[FFmpeg-devel] [PATCH] lavfi: port decimate libmpcodecs filter

Nicolas George nicolas.george at normalesup.org
Sun Mar 18 22:39:03 CET 2012


Le nonidi 29 ventôse, an CCXX, Stefano Sabatini a écrit :
> +static int poll_frame(AVFilterLink *outlink)
> +{
> +    DecimateContext *decimate = outlink->src->priv;
> +    AVFilterLink *inlink = outlink->src->inputs[0];
> +    int count, ret;
> +
> +    if (!av_fifo_size(decimate->pending_frames)) {
> +        if ((count = avfilter_poll_frame(inlink)) <= 0)
> +            return count;
> +        /* request frame from input, and apply decimate condition to it */
> +        decimate->cache_frames = 1;
> +        while (count-- && av_fifo_space(decimate->pending_frames)) {
> +            ret = avfilter_request_frame(inlink);
> +            if (ret < 0)
> +                break;
> +        }
> +        decimate->cache_frames = 0;
> +    }
> +
> +    return av_fifo_size(decimate->pending_frames)/sizeof(AVFilterBufferRef *);

Could I motivate you to comment on my proposal to eliminate poll_frame
before adding new code that have to implement complex things in it?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120318/5a3f4e4f/attachment.asc>


More information about the ffmpeg-devel mailing list