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>
This commit is contained in:
Andreas Rheinhardt 2021-05-14 11:22:31 +02:00
parent 376e80ad74
commit a0ab83bf93
1 changed files with 0 additions and 4 deletions

View File

@ -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],