diff mbox series

[FFmpeg-devel,6/6] avfilter/vf_find_rect: Don't make frame writable unnecessarily

Message ID AM7PR03MB6660C500F7BA2842CD539CA98FEE9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit c8b1c9f97a20ed0a172e9a6acd36a4ac55243a22
Headers show
Series [FFmpeg-devel,1/6] avfilter/af_aderivative: Don't use audiobuf for only 1 sample, fix leak | expand


Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 1, 2021, 9:15 p.m. UTC
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>
 libavfilter/vf_find_rect.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series


diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c
index 1a94655b6b..415d633579 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);