Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Artem Smorodin via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Artem Smorodin <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] abformat/tee: fixing the default options setting (PR #20710)
Date: Wed, 15 Oct 2025 19:48:30 -0000
Message-ID: <176055771143.25.10044101243981870768@bf907ddaa564> (raw)

PR #20710 opened by Artem Smorodin (artem.smorodin.dacast)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20710
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20710.patch

I found that the default value is not set for `onfail` option.

I see that there is an attempt to set this value by default inside `parse_slave_failure_policy_option`. But look at the `CONSUME_OPTION` macro. If `av_dict_get` cannot find this option, then this function is not even called. I mean `if (en) { `


>From 293a527ada263a9e42cbd0957c362e40b594f1e2 Mon Sep 17 00:00:00 2001
From: Artem Smmorodin <artem.smorodin@dacast.com>
Date: Wed, 15 Oct 2025 22:38:57 +0300
Subject: [PATCH] Fixing the default option setting

---
 libavformat/tee.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index 0bac4fa202..d1dd4e424e 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -152,6 +152,11 @@ static void close_slaves(AVFormatContext *avf)
     av_freep(&tee->slaves);
 }
 
+static void set_slave_defaults(TeeSlave *tee_slave)
+{
+    tee_slave->on_fail = DEFAULT_SLAVE_FAILURE_POLICY;
+}
+
 static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
 {
     int ret;
@@ -167,6 +172,8 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
     if ((ret = ff_tee_parse_slave_options(avf, slave, &options, &filename)) < 0)
         return ret;
 
+    set_slave_defaults(tee_slave);
+
 #define CONSUME_OPTION(option, field, action) do {                      \
         AVDictionaryEntry *en = av_dict_get(options, option, NULL, 0);  \
         if (en) {                                                       \
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

                 reply	other threads:[~2025-10-15 19:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=176055771143.25.10044101243981870768@bf907ddaa564 \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /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