vf_split: define draw_slice() before end_frame()
Improve logical coherence, fix nit.
This commit is contained in:
parent
88fc2e411e
commit
de1100a00a
@ -33,6 +33,12 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
|
|||||||
avfilter_ref_buffer(picref, ~AV_PERM_WRITE));
|
avfilter_ref_buffer(picref, ~AV_PERM_WRITE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
|
||||||
|
{
|
||||||
|
avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
|
||||||
|
avfilter_draw_slice(inlink->dst->outputs[1], y, h, slice_dir);
|
||||||
|
}
|
||||||
|
|
||||||
static void end_frame(AVFilterLink *inlink)
|
static void end_frame(AVFilterLink *inlink)
|
||||||
{
|
{
|
||||||
avfilter_end_frame(inlink->dst->outputs[0]);
|
avfilter_end_frame(inlink->dst->outputs[0]);
|
||||||
@ -41,12 +47,6 @@ static void end_frame(AVFilterLink *inlink)
|
|||||||
avfilter_unref_buffer(inlink->cur_buf);
|
avfilter_unref_buffer(inlink->cur_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
|
|
||||||
{
|
|
||||||
avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
|
|
||||||
avfilter_draw_slice(inlink->dst->outputs[1], y, h, slice_dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
AVFilter avfilter_vf_split = {
|
AVFilter avfilter_vf_split = {
|
||||||
.name = "split",
|
.name = "split",
|
||||||
.description = NULL_IF_CONFIG_SMALL("Pass on the input to two outputs."),
|
.description = NULL_IF_CONFIG_SMALL("Pass on the input to two outputs."),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user