From patchwork Wed May 15 09:43:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiqi Zhu X-Patchwork-Id: 48894 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3a48:b0:1af:fc2d:ff5a with SMTP id zu8csp1484513pzb; Wed, 15 May 2024 02:43:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWxWDYObzoaFGyfapjy9IjaSoKbCIU19zLQusnU3uCbyxUFz2Y7MowUauiY+uq6yLKBXtnG9BMF4Rbn5PLB0NHdZai49nAB9GtUPQ== X-Google-Smtp-Source: AGHT+IHgY18CLS7bdZ7m2Uat9KDPDrx5ntWSJTnRPsJcinq/4tsE7hf/XLFEwtTSyMlXHU2jG/bO X-Received: by 2002:a19:5f44:0:b0:51d:530f:dceb with SMTP id 2adb3069b0e04-522102779f9mr14389649e87.57.1715766202868; Wed, 15 May 2024 02:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715766202; cv=none; d=google.com; s=arc-20160816; b=YrNkq8fZNN5CAphXegnUHVZEHUXXTkTVotLT+lCMe35N7PaEmBrkWjOHgEMJ8Ku0MZ 3DIeFIxJlC2zGG1qoxnpkRqtraRG9XkjNDZ9FkUd3hlTGmh9oZFZ25fJfJCGmJQvC509 bRsGm+rAwjZGrgUJjVoYZ9h0gDsYgzLBkizgdEPQABJvYPK3R2iFcJ3W5jNNA/knfdhg ODQWaQsWDczBg8KL+hMdCSqdQ6Cy5X1Ut4/1kdtd9B8r8OYiWgcfH3ibC1o3fMCBh19q GloQ33JJn52NZgqGE1N4UpRNB7AZUfJRG0TaYzD161DS2JNH135Emw7KKWjFKix+PZm/ ZdQg== 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 :dkim-signature:delivered-to; bh=YsScuhY/Lgb1FDAgTNqWs1Vn5Cls72QVZbQhZWRLhRg=; fh=jGeylq5Cq8cixZoV2Zp7uaY6E5GFel41JHto3Y2hIBs=; b=grgtzW7YehpD8P/3wzE4lTWceIcgzgJOBEHLxEa+FvFy0y8DcNVgXIVYENtyBXc9LN s18A3A/hjLIwosW82TTevXbBtKz6tlMfNuYleqGinjGyrLpK11vUE9vafDKUvsuUUm4u Z/W1yUgI+yolevHID+Irz1UScTrQzpqUAxF+4QSk7fqOTqX4yL9ePZheTVGy9yXq0h73 s7AcLT9A21IiWd1AxWEIvo+5iDET/8jJu9tKCnht6VzxhkR6RBmetLGBwHJ09PbVLEpB wRq00nuLGp8p5pWGhAqGapTuZP43+0BIGZDZdkFHFO01IC1kSgKe9AvtFubtYieRBChc aeAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=SgL7n4bp; 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 2adb3069b0e04-521f39dd254si4724723e87.604.2024.05.15.02.43.22; Wed, 15 May 2024 02:43:22 -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=20230601 header.b=SgL7n4bp; 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 850EB68D68B; Wed, 15 May 2024 12:43:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7574D68D274 for ; Wed, 15 May 2024 12:43:10 +0300 (EEST) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1f0937479f8so2865325ad.3 for ; Wed, 15 May 2024 02:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715766188; x=1716370988; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3cwtPSoWJ/nZd6gNE2RMPfDga2OIihsj5T1P9q7K5Wo=; b=SgL7n4bpSZAMzmCYPnURgfPTaHTP2rtnGaCNYjNiyEwH6HAfnaqgOPAktZRMZ0wUru lKVLwG6aYAxkQFBHUYJsmY1oXPRbXn/9vMsqINI4lCNO3df+myNFpF4YS2ycBc7B3J7s njKjSycXWca/X2I9lIX0Dc53+KKh/G4VrO6RU8J88ZJL3p8ONS/gz+KrpTQH9reL0K85 NrmS2o7W0Fzjd9iIC9EZ/imyqTz86wgIC+TTCR4227Nex6iZhkF0g/uNt6BGTSBnLwXq CDjcBPCioV4VgIl3yaXvMDhRa8cOsSK8lBhZPkt048rDw1mqq+/08ML0cNaT3Hn4AwLV jUiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715766188; x=1716370988; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3cwtPSoWJ/nZd6gNE2RMPfDga2OIihsj5T1P9q7K5Wo=; b=HvN3oKoDnb5pcXQS0oMQYq/IJEliyVMULQSOgoUU7zIIo5g/qo5fQ80vQDHYQxUTBv FJZtHfkXnAFQ9mGQhbkIVf4ymCOz4i4j0ue6mkKKudzPoYjFqyvhKWBT97WhRI/hF0Tq OLSkL05iRcWa9DpRzq7JxuBhWOCCN7/MjIvQExzkha4GTcDArzCitFvNtiQEXAa8wium ZevURlgUVc7lijNU1hl7op1PL6PZiihOZAdYRdQ3yTC7lL/4OkwKVIb+K0OQgoD0aNzm oFyLNWryhokvIH/M1RU5mzuWiLJz7eyOeTsM3sMUhGJyP3r40MU3JX6Gm2rpBZ3DJrP3 7k3Q== X-Gm-Message-State: AOJu0YxL0O8oHxcWaHRhbSJRqxDhoJRbblBN2DYuaZ8oxf0lrT2vPxqt NdwpodalTIDGeA12q1CvPsyuuyqHJchKzdJYP8LAIqoMltgOosu8DSM7Tg== X-Received: by 2002:a17:902:ecc6:b0:1ea:b3ba:79f5 with SMTP id d9443c01a7336-1ef44059a56mr195928795ad.60.1715766187895; Wed, 15 May 2024 02:43:07 -0700 (PDT) Received: from PC.mioffice.cn ([43.224.245.231]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0badcd5asm114179665ad.96.2024.05.15.02.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 02:43:07 -0700 (PDT) From: Shiqi Zhu To: ffmpeg-devel@ffmpeg.org Date: Wed, 15 May 2024 17:43:02 +0800 Message-Id: <20240515094302.1912784-1-hiccupzhu@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavformar/demux: fix dts being incorrectly set to pts 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: Shiqi Zhu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: FrIQEpTbqWsQ Signed-off-by: Shiqi Zhu --- libavformat/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index ecefe7e0a7..e19b8b6473 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1112,7 +1112,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, /* presentation is not delayed : PTS and DTS are the same */ if (pkt->pts == AV_NOPTS_VALUE) pkt->pts = pkt->dts; - update_initial_timestamps(s, pkt->stream_index, pkt->pts, + update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts, pkt); if (pkt->pts == AV_NOPTS_VALUE) pkt->pts = sti->cur_dts;