From patchwork Wed Apr 18 21:35:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 8499 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.85 with SMTP id c82csp3555182jad; Wed, 18 Apr 2018 14:35:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx49H1om5rsXDK7hg0WOpcnShcbsYXo6a13pnHAYSbBm0paNP5oiaaR7FluxZ8efLkyEjbyDD X-Received: by 10.28.153.213 with SMTP id b204mr2953234wme.79.1524087347684; Wed, 18 Apr 2018 14:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524087347; cv=none; d=google.com; s=arc-20160816; b=v6ANo9SCq78oMNjqT1M/7mlOF+lCe3NpAW/5pPkltEo8hm8xaqEiPh4evT3uOwCNCd ydeKgtdK1EmO1n2xWpyq2gYzhy8ZQyBP4e6K6VnzI1YslIyvp2pny3YFdG1f982v3KbY hv55C5BcoaoOv6GX7TIpge1CjnxtNu8Za23h5yOOkDLS+hIOPVLiqUyaYCRkRY5gZGoP nR2ir0nWz5Lke+SU2bZRN5gj/5ac3p5N26phO8mJMw7ElPRa0iUVrqQMsoyAx3ovw25j i3ovphtrZJG5qAoVSTCs7lpz3C0AqFCIp5j8fJOhqKz/mvnBhJNylf+gA+MUWmqq+us3 XKJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :in-reply-to:mime-version:references:message-id:to:from:date :delivered-to:arc-authentication-results; bh=kCQPBzPI17oj+tVAHFLz24oT4TJ+TMMEgS6CO1ZBsz0=; b=P6AKB2zzVeGJmRP4wXE7MUvck1LRS0ZcR7wWYszSqGF5Exbes7BH0J8dQbuZGw7ovm Mjwl+bxytMuwoPooNCpwX05HVq/YyoSJKvV+dt4KP7Ta7hhRDa0fIc2roCmUvK4/MhEN xN69V1kVF/GigqHyi9kyHq3helX4I3k6FxUwjk5oGBlZ+GAka3nLe0K1ZPAE4kmg55XQ gH0pakyWSxKnouBnEz9VuWhlHAsrOftLOgGKnrTUHlG5WYKE405mSFDXgCuT+lp4OdnA EYv5rK+NL8b2m9qRydxd9rA9Umen867I4YO2cJuliat2p+7ZlRtl7b4GsvIw2Bt9qoMR eZVQ== 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 58-v6si1859784wrx.247.2018.04.18.14.35.47; Wed, 18 Apr 2018 14:35:47 -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; 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 1076E68A214; Thu, 19 Apr 2018 00:35:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 82E6F68A121 for ; Thu, 19 Apr 2018 00:35:12 +0300 (EEST) Received: from localhost (213-47-41-20.cable.dynamic.surfer.at [213.47.41.20]) (Authenticated sender: michael@niedermayer.cc) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 495D8240003 for ; Wed, 18 Apr 2018 23:35:39 +0200 (CEST) Date: Wed, 18 Apr 2018 23:35:38 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20180418213538.GD20131@michaelspb> References: <1523995188-52827-1-git-send-email-derek.buitenhuis@gmail.com> MIME-Version: 1.0 In-Reply-To: <1523995188-52827-1-git-send-email-derek.buitenhuis@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [FFmpeg-devel] [PATCH] mov: Properly abide by the track's media duration X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" On Tue, Apr 17, 2018 at 08:59:48PM +0100, Derek Buitenhuis wrote: > The track's media duration from the mdhd atom takes precedence > over both the stts and elst atom for calculating and setting > the track's total duraion. > > Technically, we shouldn't be using the stts atom at all for > calculating stream durations. > > This fixes incorrect stream and final packet durations on files > with edit lists that are longer than the media duration. > > Signed-off-by: Derek Buitenhuis > --- > Personally I'd have removed the incorrect setting of the stream > duration in the stts reading code... > --- > libavformat/mov.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) This breaks fate: (have not tested anything beyond this) TEST adtstoasc_ticket3715 Test adtstoasc_ticket3715 failed. Look at tests/data/fate/adtstoasc_ticket3715.err for details. make: *** [fate-adtstoasc_ticket3715] Error 1 [...] --- ./tests/ref/fate/adtstoasc_ticket3715 2018-04-17 14:20:30.500366780 +0200 +++ tests/data/fate/adtstoasc_ticket3715 2018-04-18 23:34:00.751854625 +0200 @@ -92,4 +92,4 @@ 0, 83968, 83968, 1024, 465, 0xeb3ce0af 0, 84992, 84992, 1024, 326, 0x7be4a667 0, 86016, 86016, 1024, 339, 0x2cf4a71f -0, 87040, 87040, 1028, 258, 0xd4007ad4 +0, 87040, 87040, 1024, 258, 0xd4007ad4