Signed-off-by: softworkz <[email protected]>
---
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
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".