From patchwork Thu Nov 25 15:04:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 31666 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp849608iob; Thu, 25 Nov 2021 07:06:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwO/XmJfXcLY9uNctHUR5Sy2RIb38H5FfKzxtnWmT4CRgCGzqEyVVoBAyQb6jRXn4lKNGV8 X-Received: by 2002:a17:906:e103:: with SMTP id gj3mr31968222ejb.456.1637852791708; Thu, 25 Nov 2021 07:06:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637852791; cv=none; d=google.com; s=arc-20160816; b=GfgdYY366G0sPrdfIxZp/Gu0TY9HYISBV6ul1m6Q4Bus8aehDUVJwDjaM3D6g0ssbu yAnD+4IrxFGIi4emQuGVWRC1A3ijwK+3uKKrw54tlF+JMc3kt6wj/E0qOERGNAr1YHAz 4uGBB1Ocm39e9GnVQzFEZz8SRtuSqgLTgkWmZ6u2cKVfy98bJGNYgNgYMAGQ1ekamCsD W6FydIr/sPYAL2maI1h67cDJjrZyl+Dv5suXQaMCV6IMAfNoVFbu/hT7HXpiaJP/0jvw tdTCRFX/gXI28RY9JHQD+slKfv4AdFtJO/p4eR0UktHrcLRdWl3oTi9Ufsi0sfxV1A+a BRbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=aZincRK5jlLJD8uJYQBnVDBVs9FlefSf+jvV5047G4U=; b=QaBF1pmWWk37ndzdyZLHU/YCp6Me80Us1u/kERnXgBHWvP9f9G7P+xAMSgF8HSVvR5 T99b4yFYXCnMGJRhZ9KHVikg5ydhKrZxN7SCGZO4ztLDZaQnsodpCLi5LIG/fW1a4XuD pGVYw2nAy/SVajaEIBgnHSKDxvLlFqdktypCNa33WZ+KPOKLUC5TAXNbJu0Cv3iITfH+ NRWyg8tqHPz6lzhpm5X97czp1b/kUlcC49dxHHuZGUtCBpjOe08zj/p214rlz5Rp1keC Shwpzj91IS+REeS14KiJ2ue7cMX/F6rkGivJ+xEB5BjW6Yg5xKXM/KxyNxMSopEzcyl8 GN5Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id sa10si8027435ejc.689.2021.11.25.07.06.31; Thu, 25 Nov 2021 07:06:31 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 67E9168AEA0; Thu, 25 Nov 2021 17:05:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 56B6E68AE8E for ; Thu, 25 Nov 2021 17:05:14 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D458B240507 for ; Thu, 25 Nov 2021 16:05:10 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id rK32hS8mYNh5 for ; Thu, 25 Nov 2021 16:05:10 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id B3E61240511 for ; Thu, 25 Nov 2021 16:05:06 +0100 (CET) Received: by libav.khirnov.net (Postfix, from userid 1000) id C39B73A0804; Thu, 25 Nov 2021 16:05:05 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Nov 2021 16:04:59 +0100 Message-Id: <20211125150500.25040-8-anton@khirnov.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211125150500.25040-1-anton@khirnov.net> References: <20211125150500.25040-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 8/9] lavf/mov: drop a never-executed block 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: zm2k7ZVFfDc/ MOVStts.duration is unsigned since 203b0e3561d. --- libavformat/mov.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 451cb78bbf..e85eeb0a0e 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3965,16 +3965,6 @@ static void mov_build_index(MOVContext *mov, AVStream *st) current_offset += sample_size; stream_size += sample_size; - /* A negative sample duration is invalid based on the spec, - * but some samples need it to correct the DTS. */ - if (sc->stts_data[stts_index].duration < 0) { - av_log(mov->fc, AV_LOG_WARNING, - "Invalid SampleDelta %d in STTS, at %d st:%d\n", - sc->stts_data[stts_index].duration, stts_index, - st->index); - dts_correction += sc->stts_data[stts_index].duration - 1; - sc->stts_data[stts_index].duration = 1; - } current_dts += sc->stts_data[stts_index].duration; if (!dts_correction || current_dts + dts_correction > last_dts) { current_dts += dts_correction;