History

avfilter/vf_colorkey: Don't manually make frame writable

Instead, set AVFilterPad.needs_writable.

Andreas Rheinhardt committed 5 years ago

Commit 631c4db1 parent ce2a77b1 file · +1 −3Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_colorkey.c+1−3
@@ -135,9 +135,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) · 134 unmodified lines
135 ColorkeyContext *ctx = avctx->priv;135 ColorkeyContext *ctx = avctx->priv;
136 int res;136 int res;
137 137
138 if (res = av_frame_make_writable(frame))
139 return res;
140
141 if (res = ff_filter_execute(avctx, ctx->do_slice, frame, NULL,138 if (res = ff_filter_execute(avctx, ctx->do_slice, frame, NULL,
142 FFMIN(frame->height, ff_filter_get_nb_threads(avctx))))139 FFMIN(frame->height, ff_filter_get_nb_threads(avctx))))
143 return res;140 return res;
@@ -180,6 +177,7 @@ static const AVFilterPad colorkey_inputs[] = { · 36 unmodified lines
180 .name = "default",177 .name = "default",
181 .type = AVMEDIA_TYPE_VIDEO,178 .type = AVMEDIA_TYPE_VIDEO,
182 .filter_frame = filter_frame,179 .filter_frame = filter_frame,
180 .needs_writable = 1,
183 },181 },
184 { NULL }182 { NULL }
185};183};

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