From patchwork Wed Jun 14 16:49:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 42074 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c526:b0:117:ac03:c9de with SMTP id gm38csp191279pzb; Wed, 14 Jun 2023 09:52:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59T1CnLH+F7Pl2TizemBFretIi5gb5M+sIyxnXwt1g5uGH/NFH1Fm7JnMrjgba3joRYEAN X-Received: by 2002:a17:907:842:b0:974:419d:7837 with SMTP id ww2-20020a170907084200b00974419d7837mr15391746ejb.34.1686761528708; Wed, 14 Jun 2023 09:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686761528; cv=none; d=google.com; s=arc-20160816; b=WDRRpBg1dOPB8v8FDwRAaoOyH72khnAaKhifVbLOkRGBQBBCS1P7eFQmBHdLhE7gu8 y+7PVVIuedOq1SNKzavN1AUzqj9mbXrfG94It3DqxRpXlqvit7GiU9huoF5iD5Yv2vbM K2H7Ybp56HlqTidLKVOTdS4ZUpRiiIZZdUKuLVZzdDeqqVD+fduHxxnxHkq0NkNYNQaO It9//u4GBbzRM4MsKHoLsW/CLL2QnizTiMsUmgTOVFDLA/zWHDe2XOcOsiYre4dR7BBn gOO4JfG4ABcPrAZZrNWX6NpvPnkGmlsANwtFDkp/p3ikpdFinOji/6vuKyd05CeB+GDa dqHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=ln5CLjP7TbPfSrthQr4MB7bI+9orao0WiJKbdHLd4Gw=; b=Rv7lN8HXY1hk+RkWEmwSzCHXs1L0IlAe9X4b12bW5zS4gIGbCDzdXVCmXPjeM5H7Ia rXWgArHalC7KXU4PTd8TS9ea8eFF6SV10eEAp/XVfne60XK5xymByLiij6+KfoddoNMd 0shLX637IQnqPWOlaBrOPYROyB5C3d3ue7Lsp+esPAxx5jB7XmSTOcuKUaekIAZFrkn2 xJ9JPCOlCJJ8vaDxHrVcrBFBN9/seaAGLmNJcMoxzTH45384qgXhVwvl1cQfrQ5mQ8CR lqvIEQErjti+Tuwxf7fd5qRUchdqlXjIRhnCAdAzJiLJcrm3p1giaKJ6+FKVGd0G5JsK sNEg== 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 t11-20020a170906a10b00b00977eb940999si8434301ejy.72.2023.06.14.09.52.08; Wed, 14 Jun 2023 09:52:08 -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 ECDE968C4E3; Wed, 14 Jun 2023 19:50:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E9CC68C472 for ; Wed, 14 Jun 2023 19:50:03 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 3B9B02405B5 for ; Wed, 14 Jun 2023 18:50:03 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id RyLUv2k5MFDe for ; Wed, 14 Jun 2023 18:50:02 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 204E2240706 for ; Wed, 14 Jun 2023 18:49:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 054093A0D13 for ; Wed, 14 Jun 2023 18:49:48 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 14 Jun 2023 18:49:06 +0200 Message-Id: <20230614164908.28712-19-anton@khirnov.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230614164908.28712-1-anton@khirnov.net> References: <20230614164908.28712-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 19/21] fftools/ffmpeg_enc: constify the subtitle passed to enc_subtitle() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 2n3yoCWd+HFh --- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_enc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 63ca542337..3da5bc4f7c 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -816,7 +816,7 @@ int enc_alloc(Encoder **penc, const AVCodec *codec); void enc_free(Encoder **penc); int enc_open(OutputStream *ost, AVFrame *frame); -void enc_subtitle(OutputFile *of, OutputStream *ost, AVSubtitle *sub); +void enc_subtitle(OutputFile *of, OutputStream *ost, const AVSubtitle *sub); void enc_frame(OutputStream *ost, AVFrame *frame); void enc_flush(void); diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index f42f4055d6..4029501313 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -462,7 +462,7 @@ static int check_recording_time(OutputStream *ost, int64_t ts, AVRational tb) return 1; } -void enc_subtitle(OutputFile *of, OutputStream *ost, AVSubtitle *sub) +void enc_subtitle(OutputFile *of, OutputStream *ost, const AVSubtitle *sub) { Encoder *e = ost->enc; int subtitle_out_max_size = 1024 * 1024;