vf_fieldorder: don't give up its own reference to the output buffer.

This commit is contained in:
Anton Khirnov 2012-07-08 17:01:17 +02:00
parent f493c644cd
commit 9203fa0b32

View File

@ -121,12 +121,13 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
AVFilterContext *ctx = inlink->dst; AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0]; AVFilterLink *outlink = ctx->outputs[0];
AVFilterBufferRef *outpicref; AVFilterBufferRef *outpicref, *for_next_filter;
outpicref = avfilter_ref_buffer(inpicref, ~0); outpicref = avfilter_ref_buffer(inpicref, ~0);
outlink->out_buf = outpicref; outlink->out_buf = outpicref;
ff_start_frame(outlink, outpicref); for_next_filter = avfilter_ref_buffer(outpicref, ~0);
ff_start_frame(outlink, for_next_filter);
} }
static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
@ -213,6 +214,7 @@ static void end_frame(AVFilterLink *inlink)
ff_end_frame(outlink); ff_end_frame(outlink);
avfilter_unref_buffer(inpicref); avfilter_unref_buffer(inpicref);
avfilter_unref_bufferp(&outlink->out_buf);
} }
AVFilter avfilter_vf_fieldorder = { AVFilter avfilter_vf_fieldorder = {