From: ffmpegagent <ffmpegagent@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: softworkz <softworkz@hotmail.com> Subject: [FFmpeg-devel] [PATCH 3/4] avcodec/dvdsubdec: don't dump images to disk based on DEBUG define Date: Fri, 07 Jan 2022 04:49:25 +0000 Message-ID: <9186ff48ec44e93fa268d743d9cb37b57c2f3301.1641530966.git.ffmpegagent@gmail.com> (raw) In-Reply-To: <pull.17.ffstaging.FFmpeg.1641530966.ffmpegagent@gmail.com> From: softworkz <softworkz@hotmail.com> It's been a regular annoyance. Introduce a debug-only parameter for this. Signed-off-by: softworkz <softworkz@hotmail.com> --- libavcodec/dvdsubdec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 52259f0730..c0f796068e 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -44,6 +44,7 @@ typedef struct DVDSubContext uint8_t used_color[256]; #ifdef DEBUG int sub_id; + int dump_imgs; #endif } DVDSubContext; @@ -597,8 +598,9 @@ static int dvdsub_decode(AVCodecContext *avctx, ff_dlog(NULL, "start=%d ms end =%d ms\n", sub->start_display_time, sub->end_display_time); - ppm_save(ppm_name, sub->rects[0]->data[0], - sub->rects[0]->w, sub->rects[0]->h, (uint32_t*) sub->rects[0]->data[1]); + if (ctx->dump_imgs) + ppm_save(ppm_name, sub->rects[0]->data[0], + sub->rects[0]->w, sub->rects[0]->h, (uint32_t*) sub->rects[0]->data[1]); } #endif @@ -745,6 +747,9 @@ static const AVOption options[] = { { "palette", "set the global palette", OFFSET(palette_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD }, { "ifo_palette", "obtain the global palette from .IFO file", OFFSET(ifo_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD }, { "forced_subs_only", "Only show forced subtitles", OFFSET(forced_subs_only), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, SD}, +#ifdef DEBUG + { "dump_imgs", "Dump subtitle images to disk", OFFSET(dump_imgs), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, SD}, +#endif { NULL } }; static const AVClass dvdsub_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".
next prev parent reply other threads:[~2022-01-07 4:50 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-07 4:49 [FFmpeg-devel] [PATCH 0/4] avcodec/dvbsubdec, dvdsubdec: " ffmpegagent 2022-01-07 4:49 ` [FFmpeg-devel] [PATCH 1/4] avcodec/dvbsubdec: " ffmpegagent 2022-01-07 4:49 ` [FFmpeg-devel] [PATCH 2/4] avcodec/dvbsubdec: fix writing ppm ffmpegagent 2022-01-07 4:49 ` ffmpegagent [this message] 2022-01-07 4:49 ` [FFmpeg-devel] [PATCH 4/4] avcodec/dvdsubdec: " ffmpegagent 2022-01-07 10:20 ` [FFmpeg-devel] [PATCH 0/4] avcodec/dvbsubdec, dvdsubdec: don't dump images to disk based on DEBUG define Hendrik Leppkes 2022-01-07 10:31 ` Hendrik Leppkes 2022-01-07 16:14 ` Soft Works 2022-01-10 10:31 ` Hendrik Leppkes 2022-01-10 13:44 ` Soft Works 2022-01-07 19:57 ` Marton Balint 2022-01-07 20:01 ` Soft Works 2022-01-07 21:53 ` Marton Balint 2022-01-07 22:20 ` Soft Works 2022-01-10 19:55 ` [FFmpeg-devel] [PATCH v2 0/2] " ffmpegagent 2022-01-10 19:55 ` [FFmpeg-devel] [PATCH v2 1/2] avcodec/dvdsubdec, dvbsubdec: " ffmpegagent 2022-01-10 19:55 ` [FFmpeg-devel] [PATCH v2 2/2] avcodec/dvdsubdec, dvbsubdec: fix writing ppm ffmpegagent 2022-02-03 22:08 ` [FFmpeg-devel] [PATCH v2 0/2] avcodec/dvbsubdec, dvdsubdec: don't dump images to disk based on DEBUG define Soft Works 2022-05-28 14:52 ` [FFmpeg-devel] [PATCH v3] avcodec/dvdsubdec, dvbsubdec: remove bitmap dumping in DEBUG builds softworkz 2022-06-08 20:30 ` Marton Balint
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=9186ff48ec44e93fa268d743d9cb37b57c2f3301.1641530966.git.ffmpegagent@gmail.com \ --to=ffmpegagent@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=softworkz@hotmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git