[FFmpeg-devel] [PATCH v2] avfilter/vf_guided: add null pointer check of ref_frame and main_frame
Steven Liu
liuqi05 at kuaishou.com
Fri May 14 05:57:45 EEST 2021
fix CID: 1484785
check ref_frame and main_frame before use them
Ignore previous patch please, this should better than that.
Signed-off-by: Steven Liu <liuqi05 at kuaishou.com>
---
libavfilter/vf_guided.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c
index e7c689e7be..0868b9cd4f 100644
--- a/libavfilter/vf_guided.c
+++ b/libavfilter/vf_guided.c
@@ -334,7 +334,7 @@ static int process_frame(FFFrameSync *fs)
}
av_frame_copy_props(out_frame, main_frame);
- if (ctx->is_disabled || !ref_frame) {
+ if (ctx->is_disabled && ref_frame && main_frame) {
av_frame_copy_props(ref_frame, main_frame);
}
--
2.25.0
More information about the ffmpeg-devel
mailing list