From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5932040932 for ; Sat, 31 Dec 2022 19:26:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA93468BA2B; Sat, 31 Dec 2022 21:26:45 +0200 (EET) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A54468B109 for ; Sat, 31 Dec 2022 21:26:39 +0200 (EET) Received: by mail-wr1-f52.google.com with SMTP id h16so22922864wrz.12 for ; Sat, 31 Dec 2022 11:26:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=tImHOFkHHG6biGLQvifrK1ib0KqUYwChSnYO34/xwsY=; b=SuEzbiBDehGZ0Z6Tht+FC6klHWwIefHxU++rSE3WYOX7dZJ5e76+LUHT0jOufdhq+R 1v9/Qh//U9wXqn2HHh1Ud0qBGu2DR3RGACMRXjPokNDGXD/euGJOvi84VeVUMp/CX4xB 2CkKGaxLPKboMs8dNEXMOgbHmkfmsFLFne8m1VvCXlBrUnG1p1CLF+1Lfosa5z4SiBTm 2pLZrawbvs4Y7AU7tmSPQ0ozamW9cxFqQ/oSyCjeUiYfNsw1YAXDCbu4vw7+M4jq9iy5 gAMebRpGsAlzLCCkh5COiBkPd7JaLZrzmg16264lmsQ+368V+jEs6J/K3uRnWmxSWbRf 7Utg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tImHOFkHHG6biGLQvifrK1ib0KqUYwChSnYO34/xwsY=; b=53ezdTmg8oXESjo+1EGIjJilI/QnTbhgGlTKHymESB+emFDZY3CVi4wEMc6OL8OiK7 Jkf9W1H4iFwNJqKmmFYVr3jZ6SWZz1aGs/bMGyyT/l1L8iz5BBOOATbBaYj1wK8uQ4wG aKcW8v8C5SQR59pnBJKHs1+coTXGOMz4dmi0Sp68JvOD+z2rHvDjgwwtHJS9sSCjx1Kh z+SYaMwOyg7+hLD/Laxnl8ayyyCWNL65w6HFvhbHGX1ete9h5Ho0CeshS4wOiBNpEyJG RcvPhkufG4eeEfoOVTlpshlaejy11Vc+ZM1kicN4QeD/lfJ9NwaG4TOtEUdjq3ER7Htx rILg== X-Gm-Message-State: AFqh2kqwHIOs6isJzLNCdYNApG4EuixAy/mSMCzehmBvPNucaJ8YZuFY /Qe1oJ1umkv73uUK9hdJ4LCgCx4ObAfc1g== X-Google-Smtp-Source: AMrXdXtzsf5w4puxhofriDBMKgepNv1JdwabcCunQYyKCyM29/n4rDdWCbbNrKL5Uv3p0LdW2NgNBA== X-Received: by 2002:a5d:5291:0:b0:289:773c:59ee with SMTP id c17-20020a5d5291000000b00289773c59eemr7370261wrv.6.1672514797430; Sat, 31 Dec 2022 11:26:37 -0800 (PST) Received: from mariano ([82.84.225.92]) by smtp.gmail.com with ESMTPSA id h10-20020a5d4fca000000b00281eab50380sm16187479wrw.117.2022.12.31.11.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Dec 2022 11:26:36 -0800 (PST) Received: by mariano (Postfix, from userid 1000) id BC0F2BFB73; Sat, 31 Dec 2022 20:26:34 +0100 (CET) Date: Sat, 31 Dec 2022 20:26:34 +0100 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: <20221231192634.GA60434@mariano> Mail-Followup-To: FFmpeg development discussions and patches References: <20220713000217.257584-1-stefasab@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: <20220713000217.257584-1-stefasab@gmail.com> User-Agent: Mutt/1.13.2 (2019-12-18) Subject: Re: [FFmpeg-devel] [PATCH] ffprobe: use pkt->dts to compute interval ts when pts is missing 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" Archived-At: List-Archive: List-Post: --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On date Wednesday 2022-07-13 02:02:17 +0200, Stefano Sabatini wrote: > For some samples the pkt->pts is always missing, use the pkt->dts > instead. > > Fix trac issue http://trac.ffmpeg.org/ticket/4427. > --- > fftools/ffprobe.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Updated. --y0ulUmNC+osPPQO6 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-ffprobe-use-pkt-dts-to-compute-interval-ts-when-pts-.patch" >From 3788035aade64f322f31bd139da8c281a15fa611 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Wed, 13 Jul 2022 01:28:33 +0200 Subject: [PATCH 1/2] ffprobe: use pkt->dts to compute interval ts when pts is missing For some samples the pkt->pts is always missing, use the pkt->dts instead. Fix trac issue http://trac.ffmpeg.org/ticket/4427. --- fftools/ffprobe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index d2f126d9d6..cd824f5ad1 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2859,9 +2859,10 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile, } if (selected_streams[pkt->stream_index]) { AVRational tb = ifile->streams[pkt->stream_index].st->time_base; + int64_t pts = pkt->pts != AV_NOPTS_VALUE ? pkt->pts : pkt->dts; - if (pkt->pts != AV_NOPTS_VALUE) - *cur_ts = av_rescale_q(pkt->pts, tb, AV_TIME_BASE_Q); + if (pts != AV_NOPTS_VALUE) + *cur_ts = av_rescale_q(pts, tb, AV_TIME_BASE_Q); if (!has_start && *cur_ts != AV_NOPTS_VALUE) { start = *cur_ts; -- 2.25.1 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --y0ulUmNC+osPPQO6--