mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-20 22:40:47 +00:00
lavfi: unref AVFilterLink.out_buf in ff_end_frame().
This reduces code duplication and prevents stale pointers from remaining on the link.
This commit is contained in:
parent
07bad27810
commit
4c9080a7ef
@ -260,7 +260,6 @@ static void end_frame(AVFilterLink *inlink)
|
||||
|
||||
ff_draw_slice(outlink, 0, inlink->h, 1);
|
||||
ff_end_frame(outlink);
|
||||
avfilter_unref_buffer(outpicref);
|
||||
}
|
||||
|
||||
AVFilter avfilter_vf_delogo = {
|
||||
|
@ -213,7 +213,6 @@ static void end_frame(AVFilterLink *inlink)
|
||||
}
|
||||
|
||||
ff_end_frame(outlink);
|
||||
avfilter_unref_bufferp(&outlink->out_buf);
|
||||
}
|
||||
|
||||
AVFilter avfilter_vf_fieldorder = {
|
||||
|
@ -354,7 +354,6 @@ static void end_frame(AVFilterLink *inlink)
|
||||
(uint32_t *)outpicref->data[0]);
|
||||
ff_draw_slice(outlink, 0, outlink->h, 1);
|
||||
ff_end_frame(outlink);
|
||||
avfilter_unref_buffer(outpicref);
|
||||
}
|
||||
|
||||
AVFilter avfilter_vf_frei0r = {
|
||||
|
@ -225,7 +225,6 @@ static void end_frame(AVFilterLink *inlink)
|
||||
|
||||
ff_draw_slice(outlink, 0, inlink->h, 1);
|
||||
ff_end_frame(outlink);
|
||||
avfilter_unref_buffer(outpic);
|
||||
}
|
||||
|
||||
AVFilter avfilter_vf_gradfun = {
|
||||
|
@ -322,7 +322,6 @@ static void end_frame(AVFilterLink *inlink)
|
||||
|
||||
ff_draw_slice(outlink, 0, inpic->video->h, 1);
|
||||
ff_end_frame(outlink);
|
||||
avfilter_unref_buffer(outpic);
|
||||
}
|
||||
|
||||
AVFilter avfilter_vf_hqdn3d = {
|
||||
|
@ -367,7 +367,6 @@ static void end_frame(AVFilterLink *inlink)
|
||||
|
||||
ff_draw_slice(outlink, 0, outlink->h, 1);
|
||||
ff_end_frame(outlink);
|
||||
avfilter_unref_buffer(outpicref);
|
||||
}
|
||||
|
||||
AVFilter avfilter_vf_ocv = {
|
||||
|
@ -347,7 +347,6 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
|
||||
static void end_frame(AVFilterLink *link)
|
||||
{
|
||||
ff_end_frame(link->dst->outputs[0]);
|
||||
avfilter_unref_buffer(link->dst->outputs[0]->out_buf);
|
||||
}
|
||||
|
||||
static void draw_send_bar_slice(AVFilterLink *link, int y, int h, int slice_dir, int before_slice)
|
||||
|
@ -194,7 +194,6 @@ static void end_frame(AVFilterLink *inlink)
|
||||
|
||||
ff_draw_slice(outlink, 0, outpic->video->h, 1);
|
||||
ff_end_frame(outlink);
|
||||
avfilter_unref_buffer(outpic);
|
||||
}
|
||||
|
||||
AVFilter avfilter_vf_transpose = {
|
||||
|
@ -227,7 +227,6 @@ static void end_frame(AVFilterLink *link)
|
||||
|
||||
ff_draw_slice(link->dst->outputs[0], 0, link->h, 1);
|
||||
ff_end_frame(link->dst->outputs[0]);
|
||||
avfilter_unref_buffer(out);
|
||||
}
|
||||
|
||||
static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
|
||||
|
@ -225,10 +225,6 @@ static void default_end_frame(AVFilterLink *inlink)
|
||||
outlink = inlink->dst->outputs[0];
|
||||
|
||||
if (outlink) {
|
||||
if (outlink->out_buf) {
|
||||
avfilter_unref_buffer(outlink->out_buf);
|
||||
outlink->out_buf = NULL;
|
||||
}
|
||||
ff_end_frame(outlink);
|
||||
}
|
||||
}
|
||||
@ -249,6 +245,7 @@ void ff_end_frame(AVFilterLink *link)
|
||||
link->src_buf = NULL;
|
||||
}
|
||||
avfilter_unref_bufferp(&link->cur_buf);
|
||||
avfilter_unref_bufferp(&link->out_buf);
|
||||
}
|
||||
|
||||
void ff_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user