On date Sunday 2010-09-26 20:32:48 +0200, Michael Niedermayer wrote:
On Sun, Sep 26, 2010 at 07:32:45PM +0200, Stefano Sabatini wrote: [...]
+static int request_frame(AVFilterLink *outlink) +{ + AVFilterContext *ctx = outlink->src; + TInterlaceContext *tinterlace = ctx->priv; + + while (!tinterlace->frame_pending) { + int ret; + + if ((ret = avfilter_request_frame(outlink->src->inputs[0]))) + return ret; + } + + avfilter_start_frame(outlink, tinterlace->picref); + avfilter_draw_slice(outlink, 0, outlink->h, 1); + avfilter_end_frame(outlink); + tinterlace->picref = NULL; + tinterlace->frame_pending = 0; + return 0; +}
imagine your filter is called with start_frame/draw_slice/end_frame but no request_frame (this happens after a split filter for example)
+ +static int poll_frame(AVFilterLink *outlink) +{ + TInterlaceContext *tinterlace = outlink->src->priv; + + return tinterlace->frame_pending; +}
this doesnt look correct
Updated based on the tinterlace port from FFmbc, with some simplifications. Depends on the vsink_buffer which I'm going to send soon. -- If someone had told me I would be Pope one day, I would have studied harder. -- Pope John Paul I