Revision d313e17a libavfilter/vf_format.c

View differences:

libavfilter/vf_format.c
85 85
    return formats;
86 86
}
87 87

  
88
static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
89
                                        int w, int h)
90
{
91
    return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
92
}
93

  
94
static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
95
{
96
    avfilter_start_frame(link->dst->outputs[0], picref);
97
}
98

  
99
static void end_frame(AVFilterLink *link)
100
{
101
    avfilter_end_frame(link->dst->outputs[0]);
102
}
103

  
104
static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
105
{
106
    avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir);
107
}
108

  
109 88
#if CONFIG_FORMAT_FILTER
110 89
static int query_formats_format(AVFilterContext *ctx)
111 90
{
......
125 104

  
126 105
    .inputs    = (AVFilterPad[]) {{ .name            = "default",
127 106
                                    .type            = CODEC_TYPE_VIDEO,
128
                                    .get_video_buffer= get_video_buffer,
129
                                    .start_frame     = start_frame,
130
                                    .draw_slice      = draw_slice,
131
                                    .end_frame       = end_frame, },
107
                                    .get_video_buffer= avfilter_null_get_video_buffer,
108
                                    .start_frame     = avfilter_null_start_frame,
109
                                    .draw_slice      = avfilter_null_draw_slice,
110
                                    .end_frame       = avfilter_null_end_frame, },
132 111
                                  { .name = NULL}},
133 112
    .outputs   = (AVFilterPad[]) {{ .name            = "default",
134 113
                                    .type            = CODEC_TYPE_VIDEO },
......
155 134

  
156 135
    .inputs    = (AVFilterPad[]) {{ .name            = "default",
157 136
                                    .type            = CODEC_TYPE_VIDEO,
158
                                    .get_video_buffer= get_video_buffer,
159
                                    .start_frame     = start_frame,
160
                                    .draw_slice      = draw_slice,
161
                                    .end_frame       = end_frame, },
137
                                    .get_video_buffer= avfilter_null_get_video_buffer,
138
                                    .start_frame     = avfilter_null_start_frame,
139
                                    .draw_slice      = avfilter_null_draw_slice,
140
                                    .end_frame       = avfilter_null_end_frame, },
162 141
                                  { .name = NULL}},
163 142
    .outputs   = (AVFilterPad[]) {{ .name            = "default",
164 143
                                    .type            = CODEC_TYPE_VIDEO },

Also available in: Unified diff