From patchwork Mon Jul 1 12:25:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ross X-Patchwork-Id: 13791 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 6885C4472B9 for ; Mon, 1 Jul 2019 15:26:09 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4FC3568A793; Mon, 1 Jul 2019 15:26:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mx.sdf.org (mx.sdf.org [205.166.94.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EAED868A37B for ; Mon, 1 Jul 2019 15:26:02 +0300 (EEST) Received: from 0c654900d33470523bd9c4cfdd2a2ea5 (pa49-183-61-238.pa.vic.optusnet.com.au [49.183.61.238]) (authenticated (128 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x61CPoNB017490 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Mon, 1 Jul 2019 12:25:58 GMT Date: Mon, 1 Jul 2019 22:25:45 +1000 From: Peter Ross To: ffmpeg-devel@ffmpeg.org Message-ID: <93ed2b436f2031bf876cd2ea32beeeecc2f1e1de.1561983837.git.pross@xvid.org> MIME-Version: 1.0 User-Agent: Mutt/1.10.1 (2018-07-13) Subject: [FFmpeg-devel] [PATCH] ifv: populate creation_time 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" --- Small patch, to extract timestamp from IFV file header. libavformat/ifv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/ifv.c b/libavformat/ifv.c index 03c682bb9d..6acbb29a75 100644 --- a/libavformat/ifv.c +++ b/libavformat/ifv.c @@ -90,7 +90,10 @@ static int parse_header(AVFormatContext *s) uint32_t aud_magic; uint32_t vid_magic; - avio_skip(s->pb, 0x5c); + avio_skip(s->pb, 0x34); + avpriv_dict_set_timestamp(&s->metadata, "creation_time", avio_rl32(s->pb) * 1000000LL); + avio_skip(s->pb, 0x24); + ifv->width = avio_rl16(s->pb); ifv->height = avio_rl16(s->pb);