From patchwork Sat Feb 11 17:54:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 2508 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp197614vsb; Sat, 11 Feb 2017 09:55:25 -0800 (PST) X-Received: by 10.223.176.175 with SMTP id i44mr12620628wra.3.1486835725572; Sat, 11 Feb 2017 09:55:25 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 196si5874879wmg.65.2017.02.11.09.55.24; Sat, 11 Feb 2017 09:55:25 -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; dkim=neutral (body hash did not verify) header.i=@gmail.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E3CCD689DC2; Sat, 11 Feb 2017 19:55:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f178.google.com (mail-qt0-f178.google.com [209.85.216.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D4869689D31 for ; Sat, 11 Feb 2017 19:55:11 +0200 (EET) Received: by mail-qt0-f178.google.com with SMTP id x49so58874584qtc.2 for ; Sat, 11 Feb 2017 09:55:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=3PC55wpRwPphb2TBiU3wxnsqYrgQLmfSV7U1DBGBsac=; b=nftMJPxxVwZJyvE4NqYvmeDqGpR0/Qq4T7G08nnmiUKobdwxxUHl8WjFKlDbXcnOrh /wLal1gx8XnKEe1/aKU0lNxZllk79BCCNBekj2QDd5tTfmeoZRIVKIZTncl4qk/Uheyv D7iL0GZvgF6VWANQg+vM+f36O/RTjPVfmRz5ylpaAHJxInVEqdFVH++SiwOSrPse637X oZCStGfrODObt8am984YjkfFtbHsTyF29BoDgWvnu2J+ayjzCh2t5TMSnzo/qc+nx3VH rdh8kVvFGUCSIxw8gmYe/RrEbAqJHTrZAAconRiM3hz2B1BYnINJ4ypmdHKlOjZOCT1z 7O3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=3PC55wpRwPphb2TBiU3wxnsqYrgQLmfSV7U1DBGBsac=; b=VrpBiE9vn28r4n/sd0MxkTFghEDWNgJsE7yWv/LFv7TKpG3ySoolaGVEotL/wdmpW6 Bx6ZxJMzX/eS4d6abPqAxVPcGObs1JhLNI4SqBcD6Ain5ApgfOhtJajdCEY+OKf5TRqU Z/34ffPddf0KCxy7T095hzAXbco9NvRYg/oWggkxUeOGoaCVTF84bOuqDgGmnyzPm7Ws noz4Pkza20OBZrw+pLlWdGbSyddfqkjxDtpCyos/XUU4KB9IDMI6YBIvTwSJBacTBQVg BdxxG3Hyzp3eef3q/ueiDBsfoJLtfXKIGrKBflp4u71iG0zvDgkzLXwP4yZj1fkidpWG fkoA== X-Gm-Message-State: AMke39nfGHJV9j1r/iah14+hzGIGNSg1FvvtjhuoAo6fuuMUbZQs0Nrw7fhONU4tDoTbjGBERlj8oeMT543bkw== X-Received: by 10.237.53.201 with SMTP id d9mr14533387qte.235.1486835714689; Sat, 11 Feb 2017 09:55:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.172.221 with HTTP; Sat, 11 Feb 2017 09:54:54 -0800 (PST) In-Reply-To: References: <201702111355.05269.cehoyos@ag.or.at> From: Carl Eugen Hoyos Date: Sat, 11 Feb 2017 18:54:54 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [RFC/PATCH]lavf/omadec: Fix timestamps for Atrac 3 lossless 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" 2017-02-11 18:25 GMT+01:00 Paul B Mahol : > On 2/11/17, Carl Eugen Hoyos wrote: >> 2017-02-11 14:32 GMT+01:00 Paul B Mahol : >>> On 2/11/17, Carl Eugen Hoyos wrote: >> >>>> Attached patch fixes timestamps and duration for >>>> atrac_3_lossless_132kbps.aa3 >>>> from ticket #5334, the only Atrac 3 lossless sample I have. >>>> >>>> Please comment, Carl Eugen >>> >>> This is wrong thing to do, packets duration should be half >>> of what is set for atrac3al. >> >> Where can this be done? > > In demuxer, when packet duration is set. New try attached. Thank you, Carl Eugen From 40b6497e7716372545083be6704058afb2d404e4 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 11 Feb 2017 18:53:18 +0100 Subject: [PATCH] lavf/omadec: Fix packet duration for Atrac 3 lossless. --- libavformat/omadec.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 321e77e..fa53636 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -374,8 +374,13 @@ static int aal_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = 0; pkt->pos = pos; - pkt->pts = pts * 2048LL; - pkt->duration = 2048; + if (s->streams[0]->codecpar->codec_id == AV_CODEC_ID_ATRAC3AL) { + pkt->duration = 1024; + pkt->pts = pts * 1024LL; + } else { + pkt->duration = 2048; + pkt->pts = pts * 2048LL; + } return ret; } -- 1.7.10.4