Here is the updated patch in attachment.

Dominic

On 3/19/21 5:05 AM, Moritz Barsnick wrote:
> Hi Dominic,
>
> On Thu, Mar 18, 2021 at 16:15:59 -0400, Dominic Mayers wrote:
>> Hello,
>>
>> Ticket #9151
>> Applies to:
>>
>> ffmpeg version N-101612-gda12d600ea Copyright (c) 2000-2021 the FFmpeg 
>> developers
>>   built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
>>
>> Compiled ffmpeg to include libtesseract by adding --enable-libtesseract
>> to the configuration
>>
>> Issue:
>> The current version of libavfilter/vf_ocr.c does not have white space in
>> the default white list.
>> But it is recommanded to include white space:
>> https://github.com/tesseract-ocr/tesseract/issues/2923
>>
>> I attached a patch.
>>
>> Dominic
>>
>>
>> >From d71df8748556269e14ce7fa2bb5a2f639ac05d4b Mon Sep 17 00:00:00 2001
>> From: Dominic Mayers <dominic.may...@meditationstudies.org>
>> Date: Thu, 18 Mar 2021 15:52:53 -0400
>> Subject: [PATCH] Added white space to white list of libtesseract.
> Would you please change the commit message to begin with:
> "avfilter/vf_ocr: "
> and use imperative ("add white space...").
>
> Also kindly add the text (under "Issue:") from your e-mail to the body
> of the commit message (i.e. following the header, and separated by an
> empty line), so that it's clear from the commit what was changed and
> why.
>
> Also add something like this in the body:
> "Fixes #9151"
>
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

>From 12dbdb8e1a1051b3fa39bf50722dfe5fa13972cf Mon Sep 17 00:00:00 2001
From: Dominic Mayers <dominic.may...@meditationstudies.org>
Date: Thu, 18 Mar 2021 15:52:53 -0400
Subject: [PATCH] avfliter/vf_ocr: add white space to whitelist

Fixes #9151. The current version of libavfilter/vf_ocr.c does not have white
space in the default whitelist. But it is recommanded to include white
space. See https://github.com/tesseract-ocr/tesseract/issues/2923
---
 libavfilter/vf_ocr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c
index d5f76059b7..c7ccb4a84f 100644
--- a/libavfilter/vf_ocr.c
+++ b/libavfilter/vf_ocr.c
@@ -43,7 +43,7 @@ typedef struct OCRContext {
 static const AVOption ocr_options[] = {
     { "datapath",  "set datapath",            OFFSET(datapath),  AV_OPT_TYPE_STRING, {.str=NULL},  0, 0, FLAGS },
     { "language",  "set language",            OFFSET(language),  AV_OPT_TYPE_STRING, {.str="eng"}, 0, 0, FLAGS },
-    { "whitelist", "set character whitelist", OFFSET(whitelist), AV_OPT_TYPE_STRING, {.str="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:;,-+_!?\"'[]{}()<>|/\\=*&%$#@!~"}, 0, 0, FLAGS },
+    { "whitelist", "set character whitelist", OFFSET(whitelist), AV_OPT_TYPE_STRING, {.str="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:;,-+_!?\"'[]{}()<>|/\\=*&%$#@!~ "}, 0, 0, FLAGS },
     { "blacklist", "set character blacklist", OFFSET(blacklist), AV_OPT_TYPE_STRING, {.str=""},    0, 0, FLAGS },
     { NULL }
 };
-- 
2.25.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to