summaryrefslogtreecommitdiff
path: root/libavfilter/vf_guided.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-14 11:22:31 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-23 13:42:16 +0200
commita0ab83bf93c546c215be1f34becb90263c11632d (patch)
tree4456f483c4287cd37751576e755b28d7ec961945 /libavfilter/vf_guided.c
parent376e80ad7440cbb6e857ea1b48deb0b8cdf3ae90 (diff)
downloadffmpeg-a0ab83bf93c546c215be1f34becb90263c11632d.tar.gz
avfilter/vf_guided: Don't needlessly copy properties, fix potential NPD
ref_frame is owned by the framesync structure and should therefore not be modified; furthermore, these properties that are copied don't seem to be used at all, so copying is unnecessary. Finally copying when the destination frame is NULL gives a guaranteed segfault. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_guided.c')
-rw-r--r--libavfilter/vf_guided.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c
index 6ded4c7c59..ea537e40c6 100644
--- a/libavfilter/vf_guided.c
+++ b/libavfilter/vf_guided.c
@@ -323,10 +323,6 @@ static int process_frame(FFFrameSync *fs)
}
av_frame_copy_props(out_frame, main_frame);
- if (ctx->is_disabled || !ref_frame) {
- av_frame_copy_props(ref_frame, main_frame);
- }
-
for (int plane = 0; plane < s->nb_planes; plane++) {
if (!(s->planes & (1 << plane))) {
av_image_copy_plane(out_frame->data[plane], out_frame->linesize[plane],