History

avfilter/vf_delogo: unbreak fate

It is not clear what was real intention of previous commit to this filter. It was not working correctly, hopefully this is fixed now. It never checked that new x/y/w/h are actually valid, hopeffully this is fixed now. It uses named variables in expressions that are never set, still not fixed. It does not set named variables that uses actual frame widht/height, making actual expressions less usable for our users, still now fixed.

Paul B Mahol committed 7 years ago

Commit 6b090301 parent e0fab591 file · +12 −0Browse files

Unified · Split

libavfilter/vf_delogo.c+12−0
@@ -318,6 +318,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 317 unmodified lines
318 int direct = 0;318 int direct = 0;
319 int plane;319 int plane;
320 AVRational sar;320 AVRational sar;
321 int ret;
321 322
322 s->var_values[VAR_N] = inlink->frame_count_out;323 s->var_values[VAR_N] = inlink->frame_count_out;
323 s->var_values[VAR_T] = TS2T(in->pts, inlink->time_base);324 s->var_values[VAR_T] = TS2T(in->pts, inlink->time_base);
@@ -326,6 +327,17 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 2 unmodified lines
326 s->w = av_expr_eval(s->w_pexpr, s->var_values, s);327 s->w = av_expr_eval(s->w_pexpr, s->var_values, s);
327 s->h = av_expr_eval(s->h_pexpr, s->var_values, s);328 s->h = av_expr_eval(s->h_pexpr, s->var_values, s);
328 329
330 ret = config_input(inlink);
331 if (ret < 0) {
332 av_frame_free(&in);
333 return ret;
334 }
335
336 s->w += s->band*2;
337 s->h += s->band*2;
338 s->x -= s->band;
339 s->y -= s->band;
340
329 if (av_frame_is_writable(in)) {341 if (av_frame_is_writable(in)) {
330 direct = 1;342 direct = 1;
331 out = in;343 out = in;

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