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.rheinha...@outlook.com>
---
 libavfilter/vf_guided.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c
index ce78507eb6..35c518320c 100644
--- a/libavfilter/vf_guided.c
+++ b/libavfilter/vf_guided.c
@@ -333,10 +333,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],
-- 
2.27.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to