Browse code

vf_split: define draw_slice() before end_frame()

Improve logical coherence, fix nit.

Stefano Sabatini authored on 2011/05/22 08:20:53
Showing 1 changed files
... ...
@@ -33,6 +33,12 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
33 33
                          avfilter_ref_buffer(picref, ~AV_PERM_WRITE));
34 34
 }
35 35
 
36
+static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
37
+{
38
+    avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
39
+    avfilter_draw_slice(inlink->dst->outputs[1], y, h, slice_dir);
40
+}
41
+
36 42
 static void end_frame(AVFilterLink *inlink)
37 43
 {
38 44
     avfilter_end_frame(inlink->dst->outputs[0]);
... ...
@@ -41,12 +47,6 @@ static void end_frame(AVFilterLink *inlink)
41 41
     avfilter_unref_buffer(inlink->cur_buf);
42 42
 }
43 43
 
44
-static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
45
-{
46
-    avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
47
-    avfilter_draw_slice(inlink->dst->outputs[1], y, h, slice_dir);
48
-}
49
-
50 44
 AVFilter avfilter_vf_split = {
51 45
     .name      = "split",
52 46
     .description = NULL_IF_CONFIG_SMALL("Pass on the input to two outputs."),