Instead, set AVFilterPad.needs_writable.
Unified · Split
| @@ -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 | }; |