From patchwork Sat Jun 29 23:00:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cameron Cawley X-Patchwork-Id: 13765 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 34586447B8E for ; Sun, 30 Jun 2019 02:10:22 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 13D8468A362; Sun, 30 Jun 2019 02:10:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 01357688357 for ; Sun, 30 Jun 2019 02:10:15 +0300 (EEST) Received: by mail-wr1-f66.google.com with SMTP id c2so9858077wrm.8 for ; Sat, 29 Jun 2019 16:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zB8fz9m2AEVjJHL65cDDZAVtE5zYW3akIx58kVYK4I8=; b=oc9ZXufKU1grd9ZtpNCOxysZZ6S/a/Khgby2yYihmkAr4Nfxd+mNV+zFt/ppDTf7rS R163+No74Hby3Wt7eYqlt5jvCcOenNfINlEHR6DjFU+Rs87PFxm9vf+5c2GUY/ViQldq 5V+2xv2d5RRNiqJBgmYrw74YBi2iNh08X7t5h5EAEAeTRCXJVrEVGvMgD4jZLB5MtgxP HDKwIya5DqJiAa4wI28yilS7hkYic+lyygThftzo5mDnfcPvalUAXGNiJwNsvSDVX+Ev 4SbfDbtRBOGktAqYIYJPFcjlUO2npgKd5Zfc9oKViIz5FVSYsiYNA0v2WBvN6tcRDvRJ A1XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zB8fz9m2AEVjJHL65cDDZAVtE5zYW3akIx58kVYK4I8=; b=dg8dldtSa31B0uYGGAk+mZ90VLmwkUw7D4b5GgVmG80BodsgX9uVLZALdYsU4bqIoB pjz5HYSWzarahXnLFfmbzkDisUaotols4QavekHtYZlghhngmoWMKXt9L8ghNmlMM5up /yQaLzDkDYBZ1/8A0E0GWDIsHqAgHBaOpIXJXh1CVxYPlqtEutR67yVMIPS1yup9t+ah V7nNveZYdC4Mi8CEXEK4SLtZy2oZGGRVaOBlRFntpWb96xzAA4pORYcYUZjdu7zHaAMl apvPcYH8DdX4AQaa5A8RxSYNJt4DGH4mwNROKs0wweDSTGXczwc4DYD64ESewHsaoGlz FLPg== X-Gm-Message-State: APjAAAUBaEppzR3y248ub3RWkiZg3ziozt4t9wX73B7LHopwmuD8vQs1 VnqrhVrkOAsC8oWIK9fbx1x7a3Is X-Google-Smtp-Source: APXvYqyDRs1Id3z4jNYNt0kcPzTrMMZiTOPkkIWe7y6PRj6nrWke6gj0Q4AgVWS1driSlHgzRpiSCQ== X-Received: by 2002:adf:fc52:: with SMTP id e18mr12309958wrs.14.1561849387650; Sat, 29 Jun 2019 16:03:07 -0700 (PDT) Received: from localhost.localdomain (host109-145-143-151.range109-145.btcentralplus.com. [109.145.143.151]) by smtp.gmail.com with ESMTPSA id l124sm7149478wmf.36.2019.06.29.16.03.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jun 2019 16:03:07 -0700 (PDT) From: Cameron Cawley To: ffmpeg-devel@ffmpeg.org Date: Sun, 30 Jun 2019 00:00:44 +0100 Message-Id: <20190629230044.28388-2-ccawley2011@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190629230044.28388-1-ccawley2011@gmail.com> References: <20190629230044.28388-1-ccawley2011@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/2] avformat/rpl: Calculate the duration of the video track 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 Cc: Cameron Cawley MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavformat/rpl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/rpl.c b/libavformat/rpl.c index 579ab4f57e..d31c7f09ad 100644 --- a/libavformat/rpl.c +++ b/libavformat/rpl.c @@ -280,8 +280,10 @@ static int rpl_read_header(AVFormatContext *s) read_line_and_int(pb, &error); // (file index) error |= read_line(pb, line, sizeof(line)); // offset to "helpful" sprite error |= read_line(pb, line, sizeof(line)); // size of "helpful" sprite - if (vst) + if (vst) { error |= read_line(pb, line, sizeof(line)); // offset to key frame list + vst->duration = number_of_chunks * rpl->frames_per_chunk; + } // Read the index avio_seek(pb, chunk_catalog_offset, SEEK_SET);