From patchwork Sun Apr 9 13:27:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41036 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp1571812pzb; Sun, 9 Apr 2023 06:28:55 -0700 (PDT) X-Google-Smtp-Source: AKy350YOxU+l7Zh1/TvMzN+SWhnrtalPxWpcU2y/47qmoIphco8agzcsrnk8+e/oU6v4Ru9IudHF X-Received: by 2002:a17:906:2455:b0:8b1:75a5:4a92 with SMTP id a21-20020a170906245500b008b175a54a92mr5030569ejb.72.1681046935285; Sun, 09 Apr 2023 06:28:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681046935; cv=none; d=google.com; s=arc-20160816; b=g6CFqRa5Q/VUgMsJNvDgnuEony1BgKLRgBIhfFKtSBSaw6hhOtYWz8lX0f/YB5y1rJ nmdIMOgXq9nXru+g+uZK7gv7vxIqm+fXy/sjFbZCJsajJ6CbjGE5Cm00OKstRb7Dyu+k uFxNkt+z6C9Npj9bo9ba3UYdyNTDF8MuMpkp+q7vYTarYCcnLkt9BBut9DhiT+QGK8Hp BqyE9RUwjB7a81m7BQmKzHPJ2axIBNad4+btaVxRlDNoXukuKZkUscKVxcTHBQVdcyhj 1Cjw1vbUJ/hXKz1wpMNYE6Xt+tp+tprS3LuMpjPpqlXeeAWusT0H0U6ZUFfLNiYftS/p yZgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=EJFqMX+cMfV2+F72OIH+eI1MQ8WlGhNR5e2yWORK3p0=; b=nJdV5xrFzXmTkGpUFxtjb3doPyODlxn+MsfmuL9Gl+tbHLbdf1S2KbCAqqq0dPGa5P wlhFUcA1ey8Rsn7VPlk0gzyBuHMfKd/a1B2QWfy6Z90IUVUNvyOCdHq2NRDkyStEghEn g1NWVzptm4BF7auTsXH29Spn1mIqSeSRlnVilX1cb1GtDL67I79Qqbs5N9AvGdRbjb6+ jHQLSLyu6329gcC+WlVDIIBs+uv2ebICoNFXSK+Qb2mOrmCC+lmMY571Ttc1C38aVK6J 84EPeYr4ZIkQ72dAxVxd84T65Ewp1daGsNnJHJof2J0TFNd3MVdFh0iDi+mdakiAgD3c Acwg== 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 c3-20020a1709063f0300b0094762e9cf4dsi3641702ejj.732.2023.04.09.06.28.54; Sun, 09 Apr 2023 06:28:55 -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 B98F868BADF; Sun, 9 Apr 2023 16:28:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9CC41688313 for ; Sun, 9 Apr 2023 16:28:44 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id E77212405F9 for ; Sun, 9 Apr 2023 15:28:43 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id W-1Y7NEPAPch for ; Sun, 9 Apr 2023 15:28:43 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 739872404EE for ; Sun, 9 Apr 2023 15:28:43 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 0B37D3A039B for ; Sun, 9 Apr 2023 15:28:37 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 9 Apr 2023 15:27:41 +0200 Message-Id: <20230409132746.19756-2-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230409132746.19756-1-anton@khirnov.net> References: <20230409132746.19756-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] lavf/demux: treat streams with AVSTREAM_PARSE_FULL_RAW as having timestamps 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: oP99nkQfl713 In this case the timestamps are set by the parser. Cf. a6b3471c44fd981d3b33ea9050f78a0bc9494c5e Required by the following commit. --- libavformat/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index b19ab86d08d..06de71cd6e3 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -2569,7 +2569,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) extract_extradata_check(st)) break; if (sti->first_dts == AV_NOPTS_VALUE && - !(ic->iformat->flags & AVFMT_NOTIMESTAMPS) && + (!(ic->iformat->flags & AVFMT_NOTIMESTAMPS) || sti->need_parsing == AVSTREAM_PARSE_FULL_RAW) && sti->codec_info_nb_frames < ((st->disposition & AV_DISPOSITION_ATTACHED_PIC) ? 1 : ic->max_ts_probe) && (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO))