summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-01 22:48:09 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-15 22:49:06 +0200
commitc8b1c9f97a20ed0a172e9a6acd36a4ac55243a22 (patch)
tree263dfd7df1df6dd88deffbb3e03ea582accb8186
parent631c4db13b9347c38b42e10a3ca73e3408e6a2b7 (diff)
avfilter/vf_find_rect: Don't make frame writable unnecessarily
AVFrame.metadata is always owned by its AVFrame, it is not shared in the first place, so one does not need to make the frame writable to modify it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavfilter/vf_find_rect.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c
index c0c210d9ef..5e45d77a03 100644
--- a/libavfilter/vf_find_rect.c
+++ b/libavfilter/vf_find_rect.c
@@ -225,8 +225,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
snprintf(buf, sizeof(buf), "%f", best_score);
- av_frame_make_writable(in);
-
av_dict_set_int(&in->metadata, "lavfi.rect.w", foc->obj_frame->width, 0);
av_dict_set_int(&in->metadata, "lavfi.rect.h", foc->obj_frame->height, 0);
av_dict_set_int(&in->metadata, "lavfi.rect.x", best_x, 0);