[FFmpeg-devel] [PATCH 4/5] avfilter/ocr: add null check
Soft Works
softworkz at hotmail.com
Wed Oct 13 07:50:01 EEST 2021
Signed-off-by: softworkz <softworkz at hotmail.com>
---
libavfilter/vf_ocr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c
index f6249e61fc..a8be529033 100644
--- a/libavfilter/vf_ocr.c
+++ b/libavfilter/vf_ocr.c
@@ -115,8 +115,10 @@ static av_cold void uninit(AVFilterContext *ctx)
{
OCRContext *s = ctx->priv;
- TessBaseAPIEnd(s->tess);
- TessBaseAPIDelete(s->tess);
+ if (s->tess) {
+ TessBaseAPIEnd(s->tess);
+ TessBaseAPIDelete(s->tess);
+ }
}
AVFILTER_DEFINE_CLASS(ocr);
--
2.30.2.windows.1
More information about the ffmpeg-devel
mailing list