Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] abformat/tee: fixing the default options setting (PR #20710)
@ 2025-10-15 19:48 Artem Smorodin via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: Artem Smorodin via ffmpeg-devel @ 2025-10-15 19:48 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Artem Smorodin

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-15 19:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-15 19:48 [FFmpeg-devel] [PATCH] abformat/tee: fixing the default options setting (PR #20710) Artem Smorodin via ffmpeg-devel

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