From patchwork Tue Jul 30 14:56:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jiangjie X-Patchwork-Id: 50822 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b88e:0:b0:489:2eb3:e4c4 with SMTP id p14csp599669vqn; Tue, 30 Jul 2024 10:27:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXC/l1yrhe3XA6FrPa2PbsLaym1SGeiPZSHvLsUBbK54/R/wS2pV0+2FTG6JBeshMmsoxV4rv/jqLDVXfdm6Rn01r+7FrxmmT9yjA== X-Google-Smtp-Source: AGHT+IGvFENZmm5t8WXrTIGuMjd/WQ577bIC0/8qBM4pn4nhW5baWtv/tMvkhb/bNPeCNSh/KGG1 X-Received: by 2002:a2e:b5b1:0:b0:2ef:2555:e52d with SMTP id 38308e7fff4ca-2f12ee6342bmr83550441fa.45.1722360420246; Tue, 30 Jul 2024 10:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722360420; cv=none; d=google.com; s=arc-20160816; b=f1N2TKLASQ5jsvWX454884Q+Awrtu1AzTj5cQIYxBN6QShNHBt+M+Sgl2qBTtC7oiO F7cDbuAMfBTBNWMCwA5fUtx5LltdGRfylZTfuwWMQw7vnWGY1Ide4GiOzIHfUPPKkRaR 49NS+il82FdN5Me10kuuEY4BO2OPG0B1Q/speGioT1j9d/rjDj158dR9KlOAv05gO+d5 Nb+5JpaKaxgVPXQnEBjxNsbPmYI2EgV/EQlE00mUvkG+sR+BwMcm2h1qq6eD4Fqq0UUE qeWrfQ+xcHQyNd6T8vDxPZs85H02hsIQZtXK0Ab8UY3WGGZl1w8bxeR9u2MSlVOD3PCS mrLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=0WYDaKewdOV1IY+Ud7V7C/TsF+60fwVgrHSXvWDZWjg=; fh=fv6OA3HzFqU09QJAGlhtoUb3UcLt5ET2pVnc1kqVF6Q=; b=CnHJp9/lkGVl6FWi6YDogMqdQqKygKCHLpbet08/iMP/GzbO92y40Ht/5SnCjYKMxO PHGTrbzj9HNEeFkaciWZcepCmx4yDQLYe8UCaTpLmA6dSIKuxKOK8QnWRflYbNd2e1BB peKnhCRmH6tRRIb3fC38IAceVhVpk0qEloSi6eDnFCBJ+DonoDTsu0wtoNlA5YdSllOh Emb4PFupct+t4Xa/OaszUrXZUbCCXffoml51pN/3KPxRqNbSRbyo668lcb+bMIbYs8+p KY4LO4c2Hciqcpe7k10gjXVsoW6L5MSGaqY43sDUCjn0ip5aVSJaofGDaXbEyQUabx0F OSUw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Q9DBn+lj; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f03d151026si30989831fa.352.2024.07.30.10.26.59; Tue, 30 Jul 2024 10:27:00 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Q9DBn+lj; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 45C4F68D787; Tue, 30 Jul 2024 17:57:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9AEBF68D128 for ; Tue, 30 Jul 2024 17:56:58 +0300 (EEST) Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2cb55ff1007so2878721a91.0 for ; Tue, 30 Jul 2024 07:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722351416; x=1722956216; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kc7H9wIrfK+Nx4MwWq+gVlVhv87fcYEIDaTD4yeic8c=; b=Q9DBn+ljfynBobmT74ZmLLMnxYwQ8Xymxt0FkPFwyYko2TgGszLB69KVQQNbdxIv4m FvJSPRrFcDiBdi1GYbx8A5fCfZcRgC781b7YR8o3FL4UeIhKk42SAp7HmMhUnKg1u210 jT2trbYx1QJqKgPFS72fZAwhzftFOz/Td58+b+bfFQEeokcmIkQgK7sRpKoY30uMEkOZ RTvF7PqKZhfyYF6iEQBe/0+VlLTxeHR4VaNmZ5uE8Q4mWWQPqd2ZLZlhXKsPJZSZPqNM Q9tiUV6JmYFMnobDdJIHpZlscBg0EQofmKg2M0MkZF7NeyE1oqpLbLcv/RP+4s2qnQWB 17vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722351416; x=1722956216; 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=kc7H9wIrfK+Nx4MwWq+gVlVhv87fcYEIDaTD4yeic8c=; b=fgsQ4D9Gv6Yqp0pjjh0ar19ZOURte6/w+CjVFbsDYEIW75bv+e0HDe1gd4kli8ROY4 ZfDG9UiVet7TmFBhp+Ncxzxlrrpvn0+i2VwdYAVsZILOvZHuYNI50PP/QzbnrRq+Nv+i rmGprceyUExw1hhdEttkYCBAb5r2KeuMATVOfGXc7Vz5yW57V+jsH7e+lNbLQ22fHbSe sQ7dkIpHvRG4J+3G2CQHt15H31RkdMzhXyu6wZcbTRftY5d0CbYPsiFL7W+G2embjFfz RXbyqoc+8ghnGy8+z0OhNQei/V3JyBV0naWYZYZbZxxnivfIEpaKyCM4PKIux3LFGZpx u1xA== X-Gm-Message-State: AOJu0YzvHU0XNEGvoEI8coPpOBPyydFtg+d+skUjp0fIlqqcCFvTUxNz 4ix3Un8yeVFc+uxkCVkJO8jOlhgYg2ASj9P3qtjSlj6dUVAGYJUzzjNyDEzmm9v9yg== X-Received: by 2002:a17:90a:46c3:b0:2cb:674b:8b20 with SMTP id 98e67ed59e1d1-2cf7e5c16e8mr9410907a91.31.1722351416137; Tue, 30 Jul 2024 07:56:56 -0700 (PDT) Received: from localhost.localdomain ([114.93.97.121]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cdb738fd4csm12884670a91.3.2024.07.30.07.56.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2024 07:56:55 -0700 (PDT) From: jiangjie To: ffmpeg-devel@ffmpeg.org Date: Tue, 30 Jul 2024 22:56:34 +0800 Message-ID: <20240730145634.71340-1-jiangjie618@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/mov: support sidx reference_type = 1 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: jiangjie618@gmail.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: nsGylwa/+VeE --- libavformat/mov.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 1052691936..38f015a766 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -5964,11 +5964,10 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom) int index; MOVFragmentStreamInfo * frag_stream_info; uint32_t size = avio_rb32(pb); + // ReferenceType = (size & (1 << 31)) ? 1 : 0 + size = size & 0x7FFFFFFF; + uint32_t duration = avio_rb32(pb); - if (size & 0x80000000) { - avpriv_request_sample(c->fc, "sidx reference_type 1"); - return AVERROR_PATCHWELCOME; - } avio_rb32(pb); // sap_flags timestamp = av_rescale_q(pts, timescale, st->time_base);