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 582EE4E9E7 for ; Thu, 12 Jun 2025 17:34:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 05DB468C24B; Thu, 12 Jun 2025 20:34:06 +0300 (EEST) Received: from out203-205-221-191.mail.qq.com (out203-205-221-191.mail.qq.com [203.205.221.191]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 1F925687DB2 for ; Thu, 12 Jun 2025 20:33:56 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1749749633; bh=VR2Fp57WcF0ne4QG7GtVYgE9gJWDshjO8UNiEtzRlfM=; h=From:To:Cc:Subject:Date; b=FnntIruAZib9uzc7E89oDlTVy61c54vOUDEueSuEAMZf8FPye2LySdmgoDF6dXz1S U2elFWLC9Q6ej06tOr1BbqCFRn7N2FhsR1L+tgI86pMlvNTktKQXxq96CFhId7ka0K rV5Aqabw4zzcLUgk7UYA4LoPzjpTbCu7UbCroOHE= Received: from ZHILIZHAO-MB1.tencent.com ([240e:3b7:3272:9080:309a:4766:e921:d35b]) by newxmesmtplogicsvrszgpua8-0.qq.com (NewEsmtp) with SMTP id 823294E5; Fri, 13 Jun 2025 01:32:35 +0800 X-QQ-mid: xmsmtpt1749749555txno77vhq Message-ID: X-QQ-XMAILINFO: OOEWBQXMvCdjeoIwHTZhX9ANhe6+KhkRZB4BlHRm1lZQSC42V19H+f/FwRwDBU gCb4ge85wjQsIFC41lqEJGy4QrIROz1YYcA46iUrfpSsyh186voP0fZ4h5zLan1wmVedS7n3x37q 9Dt0T7C4HS6Q9yeRlzfH4v6Lj+I1rOvNPcrsD9wfbyXqe4bB4K5oyQQGGbmxum+SFeZx28Bzkzf4 ong+QVOZLjM+t6m6cCf25pRaHaGkqvUGRZQ+mDzy0uh6i5tPhI6qhZeiEyfcqXFOB0b1LDGI2nFT BDiNIQMaDyWLHieL+Tbh7PKziHoY2hT/hJZD/9OFvpiUyHa/m96lQcgCEXd3aUNzFGsSkFfDzNfe SFoTxh1r88vx7SS1vv4YcUb1sJVyTwWIDMJJBrE60ZUJn7S3YyQrHxFZLlx76W5Imu6WS9o9/tRq 0sPKnZU3b08naQVvAC/xXvOtMrpKlw8E6cTqcsMrsDXEzBFZKnf9cuoBmnyA98+6xhRueaSNlihy 8CAizcdCnvMmjec3cYZbdgIq3YBfSZRqHlYPVXZjPk833O6cM70opxESsqbrrXiK9IaZzSp9lgt2 VIkDfh640+TWtnvap+YNc36aQ23W2yo/8IG1RgB9ySyKqtiQ2+WZAFNB2yb/8eLhZw24T05m2CMH M2ox1J6qzLyw/mT6r6B3t2YN502wgOFxCBfR311aj5yvi9KjUYuEkwTGL0IH29S5AeXyWMIia6/T JPS8XJr0LZgIPsN8u83Xt2MwJ7QlYUnYGV/nreJa4iTtiv+K3Tkeqm8H15R+EDVXS68YRNR1slV+ 8bWMhQg/dQ2CPRpwpRy5SVPlXGHljWrUNXcVuiT9T9vaUndSLNcGZKQow8NdX6p8VF6kYV/NxW92 du44in6qZbKRyCI2agwI5wrdcgjkFtSkdcfmwM5JpkumYEb6KFJH9LPJfYOWgHqab4cMejR/Vm/y YGASR6NVNY8BpBhaOQwdx1/i9JTqx0lZvjJBMgtMsJlrtIA0+e0w== X-QQ-XMRINFO: M/715EihBoGSf6IYSX1iLFg= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 Jun 2025 01:32:31 +0800 X-OQ-MSGID: <20250612173231.64931-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/movenc: Fix editlist with hybrid_fragmented 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: Zhao Zhili 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: From: Zhao Zhili The segment_duration must not be set to zero when writing the moov atom for the second time. This is related to edit lists in standard MP4 files. --- libavformat/movenc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index cd5b45f6fe..a651d6d618 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -4036,8 +4036,13 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVMuxContext *mov, /* For fragmented files, we don't know the full length yet. Setting * duration to 0 allows us to only specify the offset, including * the rest of the content (from all future fragments) without specifying - * an explicit duration. */ - if (mov->flags & FF_MOV_FLAG_FRAGMENT) + * an explicit duration. + * + * For hybrid_fragmented during mov_write_trailer (mov->moov_written != 0), + * don't reset duration to zero. + */ + if (mov->flags & FF_MOV_FLAG_FRAGMENT && + !(mov->flags & FF_MOV_FLAG_HYBRID_FRAGMENTED && mov->moov_written)) duration = 0; /* duration */ -- 2.46.0 _______________________________________________ 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".