From patchwork Tue Oct 17 13:13:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TADANO Tokumei X-Patchwork-Id: 44281 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3e0b:b0:15d:8365:d4b8 with SMTP id bk11csp354882pzc; Tue, 17 Oct 2023 06:14:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/SkxfM3hJDgLMAaQ3R5zgQ3eOc0ndw5qXsh/Q22brF3Tq0EHP+5tgT6LnnHTT8bpEscxq X-Received: by 2002:a17:907:36c1:b0:9c3:730e:6947 with SMTP id bj1-20020a17090736c100b009c3730e6947mr1644342ejc.41.1697548458191; Tue, 17 Oct 2023 06:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697548458; cv=none; d=google.com; s=arc-20160816; b=N5GYVme5pVXUMfh9ti/DkPwbyyAbidXiMu2NmL4TXCZ83HLimTvQ2moLHV+rhfjLfr qcFafB2JyH09EDjzjifvHQGo03aJgMOSt02+SNvvESwNxruiH1Dd1ZmdXjI+ZIFoAtfx 1NHBXHSrZtTC1cwG3n/Oj0j4t6npcn5dF0asC08T+2yMH83WAfnLbisj0grJy7sWco3h 0mWtDnWyWFsm3/yUUTfVLLGB7tymX3zVXMKUWhK2kHD0zzD6C9Gyfh4Xkn3ZRL8ZCAHK u5tVfferiLeckjpNV2yugl3tLDJePCmAWnXwDBpyQ/GQQSqPclS57ULy094RsxqCZr91 TNJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:delivered-to; bh=oxWQnDVpGbEdaPb+WMwIT4JFPR2XKP+32iqehOWtxPU=; fh=ssXC39eKeah6YcPRlt8jBK+nQIpHohGaLsoJm2kZFpQ=; b=eUCAGR5Mu5Maxc7WoYCHRD3pmAxjQHgQL3Jwh1t0LNiNBjhVM6du/Rgait7/h5PSiK enEHoAdyXLmzeh3h6Vn/g0RvXsBxyFcdYFCXUX+d3xQoXiyKoKYBN76lrIMdXRRi0jwd ZdjBSeFVetIz0HvJi/ul5Gh/4hCdOMOzSr+D2hjbXeYlOQXoVPweL7xFyIcJABo9ruNT 7AS6P55PpI/HhiBYw2Oh4Ck1lFfOjTl0sDBurdqR2mIRTAGzF41FoxtO423p+9zpV4iz zRO5boK7HV7L2D5CXDMIhuiFqC55JBQyGCw3OKgzUuJ7cuKKZJ3vEg/2toXw4Q0GPlr5 ccGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id sa40-20020a1709076d2800b009a5f7fb51cdsi747470ejc.873.2023.10.17.06.14.07; Tue, 17 Oct 2023 06:14:18 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E704A68C9F9; Tue, 17 Oct 2023 16:14:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from dmta1020.nifty.com (mta-snd01004.nifty.com [106.153.227.36]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9F38068C9D3 for ; Tue, 17 Oct 2023 16:13:54 +0300 (EEST) Received: from osamu-pc.kimura.local by dmta1020.nifty.com with ESMTP id <20231017131350568.UOUO.131070.osamu-pc.kimura.local@nifty.com>; Tue, 17 Oct 2023 22:13:50 +0900 From: TADANO Tokumei To: ffmpeg-devel@ffmpeg.org Date: Tue, 17 Oct 2023 22:13:33 +0900 Message-Id: <20231017131335.201277-2-aimingoff@pc.nifty.jp> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017131335.201277-1-aimingoff@pc.nifty.jp> References: <20231017131335.201277-1-aimingoff@pc.nifty.jp> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 1/3] lavc/libaribcaption.c: FIX: change all `boot` option var to `int` X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: TADANO Tokumei Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: tKDOQ1mTPzcq This patch fixes a bug in curret version. On some environments, a `bool` variable is small space than `int`. If a `bool` option was specified by command line, following variables would be filled and may be destroyed by av_opt_copy(). This patch change all the `bool` option variables in `ARIBCaptionContext` to `int`. Signed-off-by: TADANO Tokumei --- libavcodec/libaribcaption.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/libaribcaption.c b/libavcodec/libaribcaption.c index 8a8c8f8cfd..be3328c5c9 100644 --- a/libavcodec/libaribcaption.c +++ b/libavcodec/libaribcaption.c @@ -68,14 +68,14 @@ typedef struct ARIBCaptionContext { int subtitle_type; int encoding_scheme; - bool ass_single_rect; + int ass_single_rect; char *font; - bool replace_fullwidth_ascii; - bool force_stroke_text; - bool ignore_background; - bool ignore_ruby; + int replace_fullwidth_ascii; + int force_stroke_text; + int ignore_background; + int ignore_ruby; float stroke_width; - bool replace_drcs; + int replace_drcs; int64_t pts; AVRational time_base;