From patchwork Wed Oct 5 14:25:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 38561 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp651753pzd; Wed, 5 Oct 2022 07:25:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UYvUpJZJfgaq6uRDoc9LgaVQk3HMQFf+q77/By7Z5qLKLsAw+xzL2933Brc87Ly5NeZzt X-Received: by 2002:a17:907:2721:b0:77f:d471:47b3 with SMTP id d1-20020a170907272100b0077fd47147b3mr23987503ejl.591.1664979937587; Wed, 05 Oct 2022 07:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664979937; cv=none; d=google.com; s=arc-20160816; b=cJCWGu+hTJYPmQg2aNErjgNWuxonAIz6TQSWucbij73tN38YdNXmT/GDcQdht7kHtu tYLFaSyGNPyJsaw5zz8wU91a+tzLp2zgUZ7d2A2v/+BzvVCmoAkyi1H4SJniMCDUa9wX iRc6alZ4SnaJgho7BI8aPnDNe+nR+7I+jcTHcc4ouTJAdKp0q/FW8MW0E2B8pjHn6rUj 3K3xQ2QG2NyastovCL6lnmNoizxs7bmLNzp1uwNV9fGMNVrpI7bcAF1hFqlWnA4g0hXw 4DOVVa3l9xzB0n0N04WNSyVxZKkOS9zRHQSNjR3dMov3yS4YWau/amtmoWktVTjSB7jx VJIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:mime-version:fcc:date:references :in-reply-to:message-id:from:dkim-signature:delivered-to; bh=nC8bvxFlzI+Nzvwa2DdHerthL0DQP7dFdUpoFly1q0Y=; b=I2cpNBMUj0jgq7IHPxTh3NS7V3i+KkFfoo54jQIyR6ZXhwW74mQp/G1/TyU7+Lyo/O r0A8Bnn879o7+KNseAl/4EHkP5WAgOfR43pkPxRaGIPpR4ohSnS9AyinRYXaN4qaY5Wz AYfIHWXep7Q+DMwJQsWuYLAEiDRCPCYIhauBK5nW3Xfpc1IHBNHRMS3Jdm5pU07wIOQq hLyr7rRGDV0rcj9CBdfhg1Pomo7BOCLb9wBDFayY0/vr2juhHcnWK5CDeLKwkK5wuJVo f142U1EflASJurKe4/eJSfoJ4okdCUz//iB2QEuRs8V0Q+Y0Btphd/rYEvMJA7RULS/u 5fAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=MH7Jnb1E; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hq9-20020a1709073f0900b0078b8bc456dcsi5105462ejc.315.2022.10.05.07.25.29; Wed, 05 Oct 2022 07:25:37 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=MH7Jnb1E; 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=QUARANTINE 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 844C568BCF2; Wed, 5 Oct 2022 17:25:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4CA8768BCA9 for ; Wed, 5 Oct 2022 17:25:12 +0300 (EEST) Received: by mail-pj1-f50.google.com with SMTP id a5-20020a17090aa50500b002008eeb040eso3086904pjq.1 for ; Wed, 05 Oct 2022 07:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=sI+o/WGaS6N956Wp0zYaOls36OaLyzZ8uWFqnks0OrQ=; b=MH7Jnb1EgPThsvyeMEcglc8goOcfzgUh0BZFxe/4lF02DRyeXCUY8z69QgqlgVZX9v RNxlNEyoS/Jpa5wZDHQXUg4MTg+2dA2jbuo56AiRieHU8zsBuWunJxZ9NRDKfgAGl3oj a6RZPP7cLaBU5IJq6soI7vG7yV28Q7ifbuTVZGjWKZyWLtPT1fdLVPu5b22jwBfrWQBY xIBsZ0qkycJkZcUpvuJEJ2zNfmtQOG+1EhMVLlcvannrjCMe5WiA+F1FqV8QNpYhjijm E3jUjU1G2ImHdoai3i/2zN497+yJUbBJ/Tzzu18Qtxx9cM8pVJ2I10wVIoHiTCk3/dDD s5yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=sI+o/WGaS6N956Wp0zYaOls36OaLyzZ8uWFqnks0OrQ=; b=MZCY1T1dbmR+ff2RmQgaADe09eyMi3AJEAy/WXmOxiJXpM9nWrkmdLPbxsYt+KOMVO D86aMMO2o+g19YzgM40oMTMc5WGh2HThapHcLSaPQGxXAAShF7ICii0yAV97UNCLLa46 T7znHl/izkK7lGlqZZNdSqjcDwKeuFKFb8kzVkYQEkJVc3GEqXkT6DjtPhDtufORHX6L mpVfYpr673UuyBXJ0O7IiLmU4riXyRQzgxcpNroDiwGpnReDjO9ktlTTRre5DH0O8sxa GBzbMppi5SKJXSegiUEsXLqnxK2kpICH+5+I6gU7ctvAU6VDJd0Qh+yL9CTiL8lkqVeC AvQQ== X-Gm-Message-State: ACrzQf31omC2nDAGZBg/nXT7csATsET0rD2nQ5WnSq+Jh48nU+13uzTR hRqCu1xOg16y9VE+ZV9NJI4u1OZ1bm4= X-Received: by 2002:a17:902:f312:b0:17d:79e9:1181 with SMTP id c18-20020a170902f31200b0017d79e91181mr22567153ple.173.1664979910444; Wed, 05 Oct 2022 07:25:10 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id 69-20020a621948000000b0056008ac8148sm8419193pfz.143.2022.10.05.07.25.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2022 07:25:10 -0700 (PDT) From: Bryce Chester Newman X-Google-Original-From: Bryce Chester Newman Message-Id: In-Reply-To: References: Date: Wed, 05 Oct 2022 14:25:07 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 1/2] libavformat/mov: Add support for exporting poster time. 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 Cc: Bryce Chester Newman Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: XR30ONb21ex/ From: Bryce Chester Newman Export the poster_time_location if available. The poster_time_location is calculated using the poster_time / time_scale = X seconds. The value of poster_time_location indicates where in the video the poster frame is. Addresses feedback from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html. Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com --- doc/demuxers.texi | 6 ++++++ libavformat/isom.h | 1 + libavformat/mov.c | 13 +++++++++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 2b6dd86c2a..b1f4926c40 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -749,6 +749,12 @@ cast to int32 are used to adjust onward dts. Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range. + +@item poster_time_location +Export the poster_time_location if available. +The poster_time_location is calculated using the poster_time / time_scale = X seconds. +The value of poster_time_location indicates where in the video the poster frame is. +Default is false. @end table @subsection Audible AAX diff --git a/libavformat/isom.h b/libavformat/isom.h index 64fb7065d5..fb3d8d5618 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -326,6 +326,7 @@ typedef struct MOVContext { int64_t extent_offset; } *avif_info; int avif_info_size; + int poster_time_location; } MOVContext; int ff_mp4_read_descr_len(AVIOContext *pb); diff --git a/libavformat/mov.c b/libavformat/mov.c index 1f436e21d6..b914bbc96a 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1501,6 +1501,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) { int i; int64_t creation_time; + int32_t poster_time; int version = avio_r8(pb); /* version */ avio_rb24(pb); /* flags */ @@ -1535,12 +1536,20 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb32(pb); /* preview time */ avio_rb32(pb); /* preview duration */ - avio_rb32(pb); /* poster time */ + poster_time = avio_rb32(pb); /* poster time */ avio_rb32(pb); /* selection time */ avio_rb32(pb); /* selection duration */ avio_rb32(pb); /* current time */ avio_rb32(pb); /* next track ID */ + if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) { + av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale); + char buffer[32]; + int poster_time_location = poster_time / c->time_scale; + snprintf(buffer, sizeof(buffer), "%i", poster_time_location); + av_dict_set(&c->fc->metadata, "poster_time_location", buffer, 0); + } + return 0; } @@ -9114,7 +9123,7 @@ static const AVOption mov_options[] = { { "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS }, { "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM }, - + { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT }, { NULL }, }; From patchwork Wed Oct 5 14:25:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 38562 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4d9:b0:9c:f4b:4e41 with SMTP id 25csp651770pzd; Wed, 5 Oct 2022 07:25:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7pD03BycUwhMGkvScq7Jlu4QMrAwwZ2bZBDpzAhkpgoWx6bCqJPXliRI+OyiDdYW1585T7 X-Received: by 2002:a17:907:1c9b:b0:783:43c:10b with SMTP id nb27-20020a1709071c9b00b00783043c010bmr24013772ejc.320.1664979938962; Wed, 05 Oct 2022 07:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664979938; cv=none; d=google.com; s=arc-20160816; b=xJtQt9M2uearYb2o1UgKPCaYpYa1MWyTWNsVvGQed/omXfXLqHElkE0odSPcDId46r GVGwQMyqtTdYafWO4Pu5mSv/FsaiJck5sobx80TC6wWIhirbaXgyi1FeqwAI8aXzWR3I iJgO7BltXxn8d7ByyQw0/2P/HpVOY1v3sj6X+V4LTbiI1BtoNwRm1/ArzsLGsNpvm+mQ s5JSMywlVTk34kPNxXOijc6hvDkDL5kI6ffmB7EBi3HTZL/78FGwcEuc0prwTqSSqAwI dRkVKEVmrzaQRvnf+3pxA05Mn1/ZR2kehYW7h4flqzmHMY8/ABC/C1YhiI9dIcmtx8EA DBrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:mime-version:fcc:date:references :in-reply-to:message-id:from:dkim-signature:delivered-to; bh=nfnNaWAEVGHTNtJ5UXwhzph+0ATubaOD1XMKCI/Rz3U=; b=OlNRLAcsJUDX9xuIzAQeY8aJWxPMy3xASTIeXililM4fjrKrQB7tLJJkgb6RKy30Z2 LSN4ASk+zK6JW4QMwZgFm5r/Jf7dvvkzYD2IXIq2o2bz5XRJ08OaAxZ9l216mLLo9Rfv 9shWDbElwLBRB37jTafgZgNwgWLDceKiEu6VchEjHnzqdUTSE3+0vWkpmPLAq9+8d9k5 3j4MLtMj5I6yIxh20zyTqx5Y6BTOMeNcDvCDk3mURVGackB828Pr6GzPbDGH0sWSKxOf +9cpNbNLqz+cD8OrMtZIDVS4R32xINMEv5/w83Aok//13zGJpBF1CYQFPuIZAXcFrDK1 CgCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=nEqoUsSK; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id eq8-20020a056402298800b00458f9a933c2si7948070edb.67.2022.10.05.07.25.38; Wed, 05 Oct 2022 07:25:38 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=nEqoUsSK; 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=QUARANTINE 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 8A6B868BCF0; Wed, 5 Oct 2022 17:25:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0C75E68BCE6 for ; Wed, 5 Oct 2022 17:25:13 +0300 (EEST) Received: by mail-pg1-f169.google.com with SMTP id e129so15368984pgc.9 for ; Wed, 05 Oct 2022 07:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=4G1/kWvzQzPg9zWFRtTfhdCUEmkndjIs/1JVNO1g/rY=; b=nEqoUsSKh2EW4xCCBe9lk9EKO6FUQCOFW9p6dYRhflhRg3w5eOnSonsMfUP2Ay9kdX SIvXrwCvog4CaIz/AYSp2rPZUBryl7erscuYSQetKmwGFY7EIKk9xB10Dnfsk/Qz2MXI 7drRdRD8gy7JsSJrRcSqB18wIeFrhKyoWNMyKNeJ7QGf+snKVLDn3r/dY5hakYKTnuBZ eqBNMBB1fju6Vn0rNi3OFDBw+k0XoCsy2ypUSARxihr8OhNxwlf/Z68BVyBPRB30rxUE vapAsbeQvLnH1M9xmfa72rfTy084nF4P+UnaK6/2f90FAsN5h05swFg8YNlipwG6Gsnf NqFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4G1/kWvzQzPg9zWFRtTfhdCUEmkndjIs/1JVNO1g/rY=; b=vylPrkNnQPxUXq4DkuWO0+rAzIWFsSwFxlY8F+T8o59vIipvjbwaQhEs8EP/FzyYfW G7Yn/Et/yay2IS0RLqUITqZn7FHpa6fgipzBmdgtTK+P29dgPEALfGjW/C2M284PnHHd eKm92Ov7gdUfnOO458IfYfPlYkssK9TK0RVR8BJObUJ6sx8AN9o4ryLH4wGuZJmY6CtG +QOAHQKIPjWx5kaN6OMUPXFT5VPmW+HeGcU1JasZc+u4VWJIiqBEluLPmGEYeIyYdLqQ 5c0EVcs4jy6QOXI3RDeC1l5qfuPsi3q+A2ntmV07mbxMIC34RQzSgTvMqFsHA0GJYDkv jXAQ== X-Gm-Message-State: ACrzQf2HYtpEmsgSGqZYtxLfaBV9JTvS2s44NPxZaYqN2FZSd+fRP4E9 ZOW6wQvdqPtkcVvQXGTWE8bxGmOWjbE= X-Received: by 2002:a05:6a00:846:b0:562:27a:278 with SMTP id q6-20020a056a00084600b00562027a0278mr79559pfk.47.1664979911299; Wed, 05 Oct 2022 07:25:11 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id c17-20020a056a00009100b00561d84772adsm2787531pfj.162.2022.10.05.07.25.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2022 07:25:10 -0700 (PDT) From: Bryce Chester Newman X-Google-Original-From: Bryce Chester Newman Message-Id: In-Reply-To: References: Date: Wed, 05 Oct 2022 14:25:08 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time. 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 Cc: Bryce Chester Newman Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1EAh6cjCMKBe From: Bryce Chester Newman Change demuxer option name from poster_time_location to export_poster_time_location. Export the poster_time_location if available. The poster_time_location is calculated using the poster_time / time_scale = X seconds. The value of poster_time_location indicates where in the video the poster frame is. Addresses feedback from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html. Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com --- doc/demuxers.texi | 4 ++-- libavformat/isom.h | 2 +- libavformat/mov.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index b1f4926c40..447287357d 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -750,10 +750,10 @@ cast to int32 are used to adjust onward dts. Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range. -@item poster_time_location +@item export_poster_time_location Export the poster_time_location if available. The poster_time_location is calculated using the poster_time / time_scale = X seconds. -The value of poster_time_location indicates where in the video the poster frame is. +The value of the poster_time_location key indicates where in the video the poster frame is. Default is false. @end table diff --git a/libavformat/isom.h b/libavformat/isom.h index fb3d8d5618..f621abec76 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -326,7 +326,7 @@ typedef struct MOVContext { int64_t extent_offset; } *avif_info; int avif_info_size; - int poster_time_location; + int export_poster_time_location; } MOVContext; int ff_mp4_read_descr_len(AVIOContext *pb); diff --git a/libavformat/mov.c b/libavformat/mov.c index b914bbc96a..be939f6cc2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1542,7 +1542,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) avio_rb32(pb); /* current time */ avio_rb32(pb); /* next track ID */ - if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) { + if(c->export_poster_time_location && poster_time && c->time_scale && c->time_scale > 0) { av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale); char buffer[32]; int poster_time_location = poster_time / c->time_scale; @@ -9123,7 +9123,7 @@ static const AVOption mov_options[] = { { "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS }, { "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM }, - { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT }, + { "export_poster_time_location", "Export the poster time location.", OFFSET(export_poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT }, { NULL }, };