From patchwork Thu Mar 18 20:15:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominic Mayers X-Patchwork-Id: 26451 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D988944ABF5 for ; Thu, 18 Mar 2021 22:16:12 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B41E668A329; Thu, 18 Mar 2021 22:16:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from bosmailout08.eigbox.net (bosmailout08.eigbox.net [66.96.185.8]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8540F687EC8 for ; Thu, 18 Mar 2021 22:16:05 +0200 (EET) Received: from bosmailscan05.eigbox.net ([10.20.15.5]) by bosmailout08.eigbox.net with esmtp (Exim) id 1lMz3s-0004FR-8v for ffmpeg-devel@ffmpeg.org; Thu, 18 Mar 2021 16:16:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=meditationstudies.org; s=dkim; h=Sender:Content-Type:MIME-Version:Date: Message-ID:Subject:From:To:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=44r99GvQJxcgMo+LaU8ttTRyoOwUlvx9xsBT0Q03SZM=; b=Aa4yyml06oeTJxZTQOIvVeGe7H xkCqWZVjsQM4ZdeZ0VoIbTJO0IdW0uZ4FG7Rb6uHjWCOLBob8dpclQTA5ItyyRWsEIW9Ji5yhMo4l 8KNGKP5LQVd+yJF59LSLOQxOnqPHo/4CITBLOsFZaBw/aQm0XwKRMC3qZs3v8Ql9VY56OD0YT8dAq aeHkHBjxVHdXxYDRMbT8kLAkLPlPrYCGXuQa5b1Qk9WFzm89ozKw1JMljqgH0OkWrZXZsCP/OG8OX tFOEuJt3uZlVISzu6vV32vE8NPMwP2Wp9ZfUmVuumF2RLkad9Evg+4q+qdRXz6ra9T48lrPIJmAYd b7FMAFjw==; Received: from [10.115.3.33] (helo=bosimpout13) by bosmailscan05.eigbox.net with esmtp (Exim) id 1lMz3r-0001bV-Sv for ffmpeg-devel@ffmpeg.org; Thu, 18 Mar 2021 16:16:03 -0400 Received: from bosauthsmtp03.yourhostingaccount.com ([10.20.18.3]) by bosimpout13 with id hwG02400G03yW7601wG3Wr; Thu, 18 Mar 2021 16:16:03 -0400 X-Authority-Analysis: v=2.3 cv=RNUo47q+ c=1 sm=1 tr=0 a=6uKCkKhFq2wXOH2GoQX8aA==:117 a=N0FHy2hWOiitBC1OM0Adrg==:17 a=dESyimp9J3IA:10 a=fw54DKJA_0cA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=Mel7kPHoAAAA:20 a=1gl6nZyq2fx4T23172wA:9 a=QEXdDO2ut3YA:10 a=vUiRMuop4GK29lMoO2oA:9 a=4bSPBPo6pFyzPKCQ:21 a=_W_S_7VecoQA:10 a=aTbebZFfAAAA:8 a=886V_ZU2qfjlfABydt0A:9 a=B2y7HmGcmWMA:10 a=LcFebzYg1F5LTdJojVW0:22 a=pHzHmUro8NiASowvMSCR:22 a=6VlIyEUom7LUIeUMNQJH:22 Received: from dsl-173-206-65-169.tor.primus.ca ([173.206.65.169]:57973 helo=[192.168.1.71]) by bosauthsmtp03.eigbox.net with esmtpa (Exim) id 1lMz3o-0007fg-Ot for ffmpeg-devel@ffmpeg.org; Thu, 18 Mar 2021 16:16:00 -0400 To: ffmpeg-devel@ffmpeg.org From: Dominic Mayers Message-ID: Date: Thu, 18 Mar 2021 16:15:59 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 Content-Language: en-US X-EN-UserInfo: 863806d77b249aef5e68aa8c3d1b07e9:931c98230c6409dcc37fa7e93b490c27 X-EN-AuthUser: dominic.mayers@meditationstudies.org X-EN-OrigIP: 173.206.65.169 X-EN-OrigHost: dsl-173-206-65-169.tor.primus.ca X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] Patch for ticket #9151 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 Subject: [PATCH] Added white space to white list of libtesseract. --- 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 } };