From 173fcda1874f89f99b3cab2f5b36b10f4f6edb24 Mon Sep 17 00:00:00 2001 From: Martin Donlon Date: Tue, 19 Jul 2022 09:54:46 -0700 Subject: [PATCH] video: Correctly setup a fallback NN filter when parsing fails (#667) --- video.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video.cpp b/video.cpp index f15ed15..ce463df 100644 --- a/video.cpp +++ b/video.cpp @@ -423,7 +423,8 @@ static bool read_video_filter(int type, VideoFilter *out) out->is_adaptive = false; valid = scale_phases(out->phases, phases, count); } - else + + if (!valid) { // Make a default NN filter in case of error out->is_adaptive = false; @@ -433,7 +434,6 @@ static bool read_video_filter(int type, VideoFilter *out) { .t = { 0, 0, 256, 0 } } }; scale_phases(out->phases, nn_phases, 2); - valid = false; } MD5Context ctx;