vf_removelogo: fix permissions.

The branch with the test was already impossible.
This commit is contained in:
Nicolas George 2012-08-14 18:48:22 +02:00
parent 616c3f3ee2
commit f6647d8825
1 changed files with 2 additions and 10 deletions

View File

@ -477,14 +477,7 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
AVFilterLink *outlink = inlink->dst->outputs[0]; AVFilterLink *outlink = inlink->dst->outputs[0];
AVFilterBufferRef *outpicref; AVFilterBufferRef *outpicref;
if (inpicref->perms & AV_PERM_PRESERVE) { outpicref = inpicref;
outpicref = ff_get_video_buffer(outlink, AV_PERM_WRITE,
outlink->w, outlink->h);
avfilter_copy_buffer_ref_props(outpicref, inpicref);
outpicref->video->w = outlink->w;
outpicref->video->h = outlink->h;
} else
outpicref = inpicref;
outlink->out_buf = outpicref; outlink->out_buf = outpicref;
return ff_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0)); return ff_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0));
@ -558,8 +551,7 @@ AVFilter avfilter_vf_removelogo = {
.draw_slice = null_draw_slice, .draw_slice = null_draw_slice,
.start_frame = start_frame, .start_frame = start_frame,
.end_frame = end_frame, .end_frame = end_frame,
.min_perms = AV_PERM_WRITE | AV_PERM_READ, .min_perms = AV_PERM_WRITE | AV_PERM_READ },
.rej_perms = AV_PERM_PRESERVE },
{ .name = NULL } { .name = NULL }
}, },
.outputs = (const AVFilterPad[]) { .outputs = (const AVFilterPad[]) {