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 A3941430A7 for ; Tue, 17 Jan 2023 09:31:37 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8821368BE28; Tue, 17 Jan 2023 11:31:34 +0200 (EET) Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A917968BDB5 for ; Tue, 17 Jan 2023 11:31:28 +0200 (EET) Received: by mail-il1-f173.google.com with SMTP id u8so15110704ilq.13 for ; Tue, 17 Jan 2023 01:31:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GWqN38PmR+0piifuOcJMepsvjDmyHhYPTeirdKGrY1k=; b=G3ooQYrxK71Svb2zD1gXmri3B0AdIcjz7ToP671impeqmm7S5hmjyykZNmPSo2Jd8+ HJS8rDI7SizOlkxoD/iyRrF1m26wXvZnP8R1R3MdagMwOo//jJ7XpT6VQA/21gPfUPpN y2EkVcKeSCJijNfNsMgomM5vyv6igUPVhBnsHEaKiTQWf3uHsxy/k7z0Tp6Isae5rs2W Gy9vIr+fIxJw0F6g9is4tFzOl0LquLWx2WGrSaPAeu1dsZjZ3srrDc76NwCf+xT/t0AX WB1e5Bs9g5BjkCKCxwy3nU1prUgL/bKg++Ez8Ceo20g5aROEWjvXv7x/9SgSOHXm2XwD kBuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GWqN38PmR+0piifuOcJMepsvjDmyHhYPTeirdKGrY1k=; b=KLwpSS8vKR9TsWONNNl7II6uh2TGsZ2yP38sVS5fSwhElYhWsX7X1Otp2Yj2aJZBFo NVGP5MEDqcTPATMEe1JEVuCFt4nwwKsB6TUWBhaZEzm2ehmOn8XJZtqNdMHHaMSAH9Hs DEnG8ZXRPvYAGBSiCSyvbYw0vcaSSBcsnVM8iN54VH5LnYgIT9koFxTXpAB35VrKfQ0d XxFdzuU26S+pCNO4rbLP+4ScPks5jja9vCrT0qFQ5JpSahSnBcZDjEBf6h7TCvkk7qfq VPGFrMRwK2xTw5wcv7dqX8gViiVw4HyOT8ju4q8Oke6Hil1n3a3H3yAIVIWX6IoQfA+1 UlWg== X-Gm-Message-State: AFqh2krLCK3n7vJDZIzLVm0wD7gqouB60G0DIvYUocUu2cOts2ET/D+I XCHpab02VTU5VVYHBl6QRS5/T5XCgCJvp9tZfPk= X-Google-Smtp-Source: AMrXdXuOvAA/cpaUZVfDVeZVpoTvYbwxqgMC/+gws00BpoeMWmtjAiws+Kw+w0rWbkREDFj9gU2D8Q== X-Received: by 2002:a05:6e02:50e:b0:30e:dcfb:6b9d with SMTP id d14-20020a056e02050e00b0030edcfb6b9dmr2084315ils.3.1673947886878; Tue, 17 Jan 2023 01:31:26 -0800 (PST) Received: from localhost (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id y12-20020a056e02178c00b0030258f9670bsm3247344ilu.13.2023.01.17.01.31.25 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Jan 2023 01:31:26 -0800 (PST) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 17 Jan 2023 11:31:23 +0200 Message-Id: <20230117093123.67731-1-martin@martin.st> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] mov: Reduce the verbosity of the warning about fragmented MP4 vs advanced edit lists 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: Derek Buitenhuis 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: Only warn if the advanced_editlist option is enabled (it is enabled by default though) so we don't print one warning for each track, and demote the warning to AV_LOG_LEVEL_VERBOSE; this message does get generated whenever parsing a fragmented MP4 file, regardless of whether the file actually uses multiple edits or not. Later when parsing the mov structures, the demuxer does warn if the file did contain multiple edits which would require the advanced_editlist option enabled for decoding correctly. Adjust the warning message for the case when the file seemed like it actually would have needed handling of advanced edit lists, to reflect the fact that it doesn't help to try set the option as it has been automatically disabled. --- libavformat/isom.h | 1 + libavformat/mov.c | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/libavformat/isom.h b/libavformat/isom.h index 64fb7065d5..5107b4eb74 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -286,6 +286,7 @@ typedef struct MOVContext { int use_absolute_path; int ignore_editlist; int advanced_editlist; + int advanced_editlist_autodisabled; int ignore_chapters; int seek_individually; int64_t next_root_atom; ///< offset of the next root atom diff --git a/libavformat/mov.c b/libavformat/mov.c index e0b7df2815..6ab43b00c6 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4063,10 +4063,15 @@ static void mov_build_index(MOVContext *mov, AVStream *st) } } - if (multiple_edits && !mov->advanced_editlist) - av_log(mov->fc, AV_LOG_WARNING, "multiple edit list entries, " - "Use -advanced_editlist to correctly decode otherwise " - "a/v desync might occur\n"); + if (multiple_edits && !mov->advanced_editlist) { + if (mov->advanced_editlist_autodisabled) + av_log(mov->fc, AV_LOG_WARNING, "multiple edit list entries, " + "not supported in fragmented MP4 files\n"); + else + av_log(mov->fc, AV_LOG_WARNING, "multiple edit list entries, " + "Use -advanced_editlist to correctly decode otherwise " + "a/v desync might occur\n"); + } /* adjust first dts according to edit list */ if ((empty_duration || start_time) && mov->time_scale > 0) { @@ -4507,10 +4512,13 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom) * It cannot be used with use_mfra_for = {pts,dts} either, as the index * is not complete, but filled in as more trun atoms are read, as well. */ - if (!sc->stts_count || c->use_mfra_for != FF_MOV_FLAG_MFRA_AUTO) { - av_log(c->fc, AV_LOG_WARNING, "advanced_editlist does not work with fragmented " + if (!sc->stts_count || c->use_mfra_for != FF_MOV_FLAG_MFRA_AUTO && + c->advanced_editlist) { + + av_log(c->fc, AV_LOG_VERBOSE, "advanced_editlist does not work with fragmented " "MP4. disabling.\n"); c->advanced_editlist = 0; + c->advanced_editlist_autodisabled = 1; } mov_build_index(c, st); -- 2.37.1 (Apple Git-137.1) _______________________________________________ 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".