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