You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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>
This commit is contained in:
@@ -225,8 +225,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
|||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%f", best_score);
|
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.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.h", foc->obj_frame->height, 0);
|
||||||
av_dict_set_int(&in->metadata, "lavfi.rect.x", best_x, 0);
|
av_dict_set_int(&in->metadata, "lavfi.rect.x", best_x, 0);
|
||||||
|
Reference in New Issue
Block a user