From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id B35064FA62 for ; Tue, 24 Jun 2025 22:08:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C0D9068D1EC; Wed, 25 Jun 2025 01:08:18 +0300 (EEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 152A368D0FE for ; Wed, 25 Jun 2025 01:08:11 +0300 (EEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-451d54214adso6924485e9.3 for ; Tue, 24 Jun 2025 15:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750802890; x=1751407690; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=7ys1WKPCVPDSPyb42orhayhpK0p5y3nbT7KkMKG57yE=; b=Qqig4ALNI/sOv2KBN6P4gi8Jgcdixs+58Hd64qBheR5uiXnKYxiYudXT4SGh4Wwem/ OT6ebuncJTkVWHgYZ0G1oI+nRGtiziQmQW5JOIZJIgBP7UEscU+kl7eqceUrT7tZuhWe slXq/3R4U2TydnCKKuNQgbQGh8Xmj6rx1MLYbWvw99/FmeQptXW2iEMX/ZfHJjjUzDm+ 2ME4rRuYqh+ODveXP+s6pyDHo6X41EPs3m2i8G/CpHqAhRN4zZeuo7SWqmJRcwl2FPGT ccBsIaust1oVyFWZTxAMOxUZGnssl7QLvG7lO96bBkLik29M0wY90OwFkff1sj1oXB9j PHUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750802890; x=1751407690; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7ys1WKPCVPDSPyb42orhayhpK0p5y3nbT7KkMKG57yE=; b=UZ0teEuh3tS0pcFs95WAGxrgKindiLiKTYk1Uf9v2v0kyUDYmt1huGnY11nAzPOvsJ hBPU5dGuKt5NPIWfHepr6Oq7/M9ARLKVeDGD8X07vqdD9nwjGpxWqN6afqTAZ/Lm39Bv d5KZdR8vG91WDEQNMOaIOUmLXLrbqXjAP/SHD6wNW5/Ct+2oG9kYhM8XgydzxqQ+pFS0 2nXyk3pdxo+PV1lKx/tC+/FXtgAe6mheg9ooa8t2fzPydWzpZ6yh3DPkYhP1gJY9KErF X9AnafGzVdcWQPCR0k4CaEl+hmGPOMcHG9AkCho5iBndCzpXZWosQMYYAdXfYLHQNICO bGpg== X-Gm-Message-State: AOJu0YyDgtzYlXQ+vRoEVZ3F8EDv7628PXwNwZnRJrbNegSrw7xtRWOy NNqXWI3NJToAAcMGLT7HMiRwvv5dgaPO8eOJmglNIgOfI01TC8EAC7A9hOP5Ig== X-Gm-Gg: ASbGncs3UuExDwATPs7RLR0Yqa80hnpB8LwkZf5aoU6sZg/PmNWEZVEXzT36T5ypJ37 /hIy7a51rAFJhjCFDMdh5F+ILu1/e4HMBqoehQ/D1j7leJI2u2zM7imbZIlBY464fD0cXeB1uyH azTCUhN+yF/bG5X6doLjHG3EfYvx535XSC89EUBoKWtxOOOBAFHSml4ey1EGACv+9dk6FvHi8nj xCfN3NbKPozv3kDKRXkmUQxppzTVoNW304Mwgh9ScVjNa3J2wGtrnP39B/OZOIMdRYd8dYJDrpH Jk8DpyUYqaEt1JVveyCxwFAqyuzyeIRvathZayzy8mi9rPt4a5oZRI60gzl5A24SdIN1+HPHk1Q PTyXAOLPn1EnLGdP42oaUHRM8YhgARKE/uZtre09QM+rr5kmsOVx9byTj9vzT0q1gKrd4Sk6cr8 XjYvE5 X-Google-Smtp-Source: AGHT+IEXjQkQSTwQokj1GK44W6qEZ7JHcW0VstG12OjDELYjCLkyzxGXVUAhaL7ihvttqlzLiJTWZw== X-Received: by 2002:a05:600c:4685:b0:451:e394:8920 with SMTP id 5b1f17b1804b1-45381aeb0aemr4770865e9.27.1750802890174; Tue, 24 Jun 2025 15:08:10 -0700 (PDT) Received: from ArmedBeast.fritz.box (p2003010237004500c9a67543cc7ba10e.dip0.t-ipconnect.de. [2003:102:3700:4500:c9a6:7543:cc7b:a10e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4538233a8c6sm1456625e9.2.2025.06.24.15.08.09 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 24 Jun 2025 15:08:09 -0700 (PDT) From: Marvin Scholz To: ffmpeg-devel@ffmpeg.org Date: Wed, 25 Jun 2025 00:08:05 +0200 Message-Id: <20250624220805.50371-2-epirat07@gmail.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250624220805.50371-1-epirat07@gmail.com> References: <20250624220805.50371-1-epirat07@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] avformat/tee: fix multiple bsfs in tee 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 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: Since 155508c6e925f4f2f5e77087a7e1925b3de735ff specifying multiple bsfs for different streams was broken: "[bsfs/a=h264_metadata:bsfs/v=h264_metadata]out.mp4|..." This incorrectly only parsed the first bsfs specification. The reason for this is that the dictionary is modified in the iterator, hence invalidating the iterator. The simplest fix for this is to simply iterate from the beginning in each loop given that the previous entry is removed. --- libavformat/tee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/tee.c b/libavformat/tee.c index 0a6e9d0c82..94a8fcb395 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -231,7 +231,7 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave) goto end; entry = NULL; - while ((entry = av_dict_get(options, "bsfs", entry, AV_DICT_IGNORE_SUFFIX))) { + while ((entry = av_dict_get(options, "bsfs", NULL, AV_DICT_IGNORE_SUFFIX))) { /* trim out strlen("bsfs") characters from key */ av_dict_set(&bsf_options, entry->key + 4, entry->value, 0); av_dict_set(&options, entry->key, NULL, 0); -- 2.39.5 (Apple Git-154) _______________________________________________ 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".