From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B2D964276C for ; Fri, 7 Jan 2022 04:49:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A028D68AE5D; Fri, 7 Jan 2022 06:49:36 +0200 (EET) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9840968073D for ; Fri, 7 Jan 2022 06:49:29 +0200 (EET) Received: by mail-pg1-f182.google.com with SMTP id y9so4448807pgr.11 for ; Thu, 06 Jan 2022 20:49:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=4nf2r2d6QoM0XjZ2DhHtaCdSmXWR2DaX6esRC1bunWs=; b=V3wH1HpQMZxIMhcjukWNA7kJjIJnLoh94Df/4YsC8686Mvt2M4DN4/B81VY8rZWxZe RLpyh96XdGlDY0DQHGEru0ulXphKwbsfoyvLV23l5ZinGYSO9xxhpppMY5f02Gbox6U5 eLOUAXIWwuJ1g2Ob6PczPxDm2vqMORGB7rEt1wLlnzwr5xzKkrugzSnyTRCmtkPqYfW+ pyzMAwaK3789h2tbAzsWVX1o9RmtE4drYRtdriqykwRHVvyy/6v/GE+GbaLJApujlZrV NaqJwjucIbo3Q1sDUV6fcbcpfEMe76BBRZ8xSB0ulIhGcW6N5+m/KxXJLsCTM664gtrG Ny6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=4nf2r2d6QoM0XjZ2DhHtaCdSmXWR2DaX6esRC1bunWs=; b=TUpQpQRUgNVAuT2uVAqWEi77tmg0vtJUnJyyN0kPm4q9jtNIOWCE9RiHiSlTtLQGup T1RQqAItWUyE5nR1kkHGkRj1B5u7SW7eD+DHM+GzT3D3oWT2ASTT9NM/DCqnK+GdkYut gti9PAl8QvM2bGH2qRTVgdYCznP8drQUC2mXsUE+7vO2IHH9wYAdiIxTh55wE3aCOPAw dMm7H/t3Vz+8dVnK9HBl7aU93lWycq4FiNT6ZyJ3mRo6qDKkkkcrRRcHREMDkA9aVxdd nkNfgTSs+0M9m9NA1ebULBlEEYFQ0t2FDN0O3WDvWAp9B4TSH6W9PNnTLCdKHH/CCQah 88cg== X-Gm-Message-State: AOAM533aLf5CR7XZRcj63qpsL7xFVmrrAfi4LEfbsAVzrI+u1n00okRb W2Tby8jWWff44IWyLjosccB/KP2wN/6NKA== X-Google-Smtp-Source: ABdhPJwFOaFVWXhhIHwnmZ0lu3PntERcFVpuMSncze6cVSw/cZ8qhe4yV+6emAYE/TUR+N/q9bKjbg== X-Received: by 2002:a05:6a00:d64:b0:4ba:cb6f:87e0 with SMTP id n36-20020a056a000d6400b004bacb6f87e0mr63091650pfv.72.1641530968095; Thu, 06 Jan 2022 20:49:28 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id w2sm3175367pgt.93.2022.01.06.20.49.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jan 2022 20:49:27 -0800 (PST) Message-Id: <6ca8905c3d9883f59851083b55817db194315c93.1641530966.git.ffmpegagent@gmail.com> In-Reply-To: References: From: ffmpegagent Date: Fri, 07 Jan 2022 04:49:23 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 1/4] avcodec/dvbsubdec: don't dump images to disk based on DEBUG define 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: softworkz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: softworkz It's been a regular annoyance. Introduce a debug-only parameter for this. Signed-off-by: softworkz --- libavcodec/dvbsubdec.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index bc741a1de6..8db9963fda 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -137,6 +137,9 @@ typedef struct DVBSubContext { DVBSubRegionDisplay *display_list; DVBSubDisplayDefinition *display_definition; +#ifdef DEBUG + int dump_imgs; +#endif } DVBSubContext; @@ -1534,11 +1537,11 @@ static int save_display_set(DVBSubContext *ctx) } - snprintf(filename, sizeof(filename), "dvbs.%d", fileno_index); - - png_save(ctx, filename, pbuf, width, height); - - av_freep(&pbuf); + if (ctx->dump_imgs) { + snprintf(filename, sizeof(filename), "dvbs.%d", fileno_index); + png_save(ctx, filename, pbuf, width, height); + av_freep(&pbuf); + } } fileno_index++; @@ -1730,6 +1733,9 @@ static const AVOption options[] = { {"compute_edt", "compute end of time using pts or timeout", OFFSET(compute_edt), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DS}, {"compute_clut", "compute clut when not available(-1) or only once (-2) or always(1) or never(0)", OFFSET(compute_clut), AV_OPT_TYPE_BOOL, {.i64 = -1}, -2, 1, DS}, {"dvb_substream", "", OFFSET(substream), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 63, DS}, +#ifdef DEBUG + { "dump_imgs", "Dump subtitle images to disk", OFFSET(dump_imgs), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DS}, +#endif {NULL} }; static const AVClass dvbsubdec_class = { -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".