History

lavfi/ass: switch to filter_frame.

Clément Bœsch committed 13 years ago

Commit 031d6441 parent 91782351 file · +4 −11Browse files

Unified · Split

libavfilter/vf_ass.c+4−11
@@ -157,8 +157,6 @@ static int config_input(AVFilterLink *inlink) · 156 unmodified lines
157157 return 0;
158158 }
159159
160−static int null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) { return 0; }
161−
162160 /* libass stores an RGBA color in the format RRGGBBTT, where TT is the transparency level */
163161 #define AR(c) ( (c)>>24)
164162 #define AG(c) (((c)>>16)&0xFF)
@@ -180,12 +178,11 @@ static void overlay_ass_image(AssContext *ass, AVFilterBufferRef *picref, · 15 unmodified lines
180178 }
181179 }
182180
183−static int end_frame(AVFilterLink *inlink)
181+static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
184182 {
185183 AVFilterContext *ctx = inlink->dst;
186184 AVFilterLink *outlink = ctx->outputs[0];
187185 AssContext *ass = ctx->priv;
188− AVFilterBufferRef *picref = inlink->cur_buf;
189186 int detect_change = 0;
190187 double time_ms = picref->pts * av_q2d(inlink->time_base) * 1000;
191188 ASS_Image *image = ass_render_frame(ass->renderer, ass->track,
@@ -196,20 +193,16 @@ static int end_frame(AVFilterLink *inlink) · 4 unmodified lines
196193
197194 overlay_ass_image(ass, picref, image);
198195
199− ff_draw_slice(outlink, 0, picref->video->h, 1);
200− return ff_end_frame(outlink);
196+ return ff_filter_frame(outlink, picref);
201197 }
202198
203199 static const AVFilterPad ass_inputs[] = {
204200 {
205201 .name = "default",
206202 .type = AVMEDIA_TYPE_VIDEO,
207− .get_video_buffer = ff_null_get_video_buffer,
208− .start_frame = ff_null_start_frame,
209− .draw_slice = null_draw_slice,
210− .end_frame = end_frame,
203+ .filter_frame = filter_frame,
211204 .config_props = config_input,
212− .min_perms = AV_PERM_WRITE | AV_PERM_READ,
205+ .min_perms = AV_PERM_READ | AV_PERM_WRITE,
213206 },
214207 { NULL }
215208 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t