From patchwork Sat Apr 8 18:37:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 41028 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp1165153pzb; Sat, 8 Apr 2023 11:37:42 -0700 (PDT) X-Google-Smtp-Source: AKy350YhXzyfcKGemT3LveJa3sHhBrW/orqRCzw6RriFQXBweNUA/TrH9UtfelgIBdYFxAqPhgwU X-Received: by 2002:a17:906:c49:b0:947:cd7a:2a3b with SMTP id t9-20020a1709060c4900b00947cd7a2a3bmr2988813ejf.69.1680979062256; Sat, 08 Apr 2023 11:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680979062; cv=none; d=google.com; s=arc-20160816; b=gifzv4nMq2WX3TUx0NrZ7t00J7mr3LAtoMAYvvYaxj2U+nf3n5sNBwR3CExeARKrv0 C17IOM+2x7co3pfiSpJAuui+FVLflpEAiPt8ybximHd7iIOkBknETohkCd3ikomse8MK RZD17lkLqWVwGN1V25NEAmGQlpfB7KJiXYg4nsJLhwFUDvrCeDxVeMgjxLYHjnmRfS4E 62qx/ozD1qIi7YZqAtSMdlJezKarwElnejFyHi7sWAYZwfRaRUZf7t5cM/AT67RyBnC+ YMW2rpZf6WWwaaAQnHpUAPRmg63uB74bWUUg6lsrkOTmIM5bTQtU46amgb1eAYITppSU wgyQ== 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:mime-version:message-id:date:to:from :delivered-to; bh=MOKY2wHQ40cAkinvY1HiiI2CwbnjqzCtU9FGi84URDc=; b=zwHVSB6LPLNk+EykBOHUVj0iwUcuX8e+SzEI9EVC9gfCR8XBfazWOFH0HDM6z/zodZ JO1Y05jHv+5bw+M/pWPYlqOgWbgGmOrdaHZ/rw13+iSiQu9DyWpRkI87/IcJAZiMo/eT mNerFf3pTVPG+0J2JWN+dUj/F1uQzI9EqPxjr/occYPILrvVw1yArC3vJR5DrEvrlKvX umRgf0xqyEq3l8a6g7G4x9Ub8/Spiw7ACzz9pQ7IUuIOfmWgXbLY2On6hc/pogztzqZG 1qk5zUPXHh9OosxxmDM7FBwnpJJh9exyCEfjFiGjvUrMG4xfpEsbW4sFhgidQT48UDkW dhww== 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 x26-20020a170906149a00b00948021ba750si2274833ejc.693.2023.04.08.11.37.41; Sat, 08 Apr 2023 11:37:42 -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 99A22689EBF; Sat, 8 Apr 2023 21:37:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2459368A4F2 for ; Sat, 8 Apr 2023 21:37:32 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id C71D4E88F4; Sat, 8 Apr 2023 20:36:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qz8ZZMkx5_-r; Sat, 8 Apr 2023 20:36:45 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 27A66E7D84; Sat, 8 Apr 2023 20:36:45 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sat, 8 Apr 2023 20:37:24 +0200 Message-Id: <20230408183724.12479-1-cus@passwd.hu> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/mov: remove hack breaking creation time parsing 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: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: hl6t/lDN37Xa Commit 23eeffcd48a15e73fb2649b712870b6d101c5471 added a hack to support invalid files where the creation date was encoded as a classic unix timestamp. This broke however valid files having creation dates before the unix epoch. Signed-off-by: Marton Balint --- libavformat/mov.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 057fd872b1..7748bdc041 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1518,8 +1518,7 @@ static int mov_read_moof(MOVContext *c, AVIOContext *pb, MOVAtom atom) static void mov_metadata_creation_time(AVDictionary **metadata, int64_t time, void *logctx) { if (time) { - if (time >= 2082844800) - time -= 2082844800; /* seconds between 1904-01-01 and Epoch */ + time -= 2082844800; /* seconds between 1904-01-01 and Epoch */ if ((int64_t)(time * 1000000ULL) / 1000000 != time) { av_log(logctx, AV_LOG_DEBUG, "creation_time is not representable\n");