From patchwork Wed Aug 12 22:14:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 21618 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 626B7449353 for ; Thu, 13 Aug 2020 01:46:04 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3539B68B527; Thu, 13 Aug 2020 01:46:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 89E0368B20E for ; Thu, 13 Aug 2020 01:45:58 +0300 (EEST) Received: by mail-ej1-f46.google.com with SMTP id f24so4052027ejx.6 for ; Wed, 12 Aug 2020 15:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Diy/veq16v5j2Ar8UreZs0TP1CyB0jl356969MRXRzw=; b=gEQsXC9Oa2vRSvMpqARZmBXBakNa24IhL8sSjNxH3mjokk26KVlwWY9oqGprkXAaEt YkmvyOrPDk044Jk+KIG5YdH/mviBsohWrcNS4K+TwZ7VylkPMBYBWFOL/83DbCBCk9q2 DEamVzOeNm02dXAypxA2afic0ZqBEJnrI+v35HAavu3Uxw0RIDMNrT9TitmoCxUEgEsw KAF0HbXcRscaCLwXwg6YBAL6YzijLwqeDUmib6CPcT1LywCmZjFp8/D8ePuG2lAesjBW BVccEhhIqOvGAHl+lfE815znQPVKxbaPT6VE7XJzvsSl5JTHKZEGRpbMjgCzLkkAfE18 Fypg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Diy/veq16v5j2Ar8UreZs0TP1CyB0jl356969MRXRzw=; b=pS1fLFWOgRDAGHHC2K9ihP7LyhkmnOWexGNIB4KHXP3Loh/qxE7CGKvajWF3208SfE sOgptHgGel6lt2eaZrAy3MDU1GTLSVpTuUiihUeZLjdmV18BuIsmVfwxArP9M9HEmb4z tbdOpQRzbbFkNGrIGGtTBtpXkKaUl5x/S1CLPEbg+uMdV5T9F7fE5vYAFd3pntU6ld35 iFLIYzME3Ht37wx4iilzpfL6d6s1pun0uqv2Ecny009BBTd6+KM6xpyAYX8ygbxzYl6p Gzd5MEGYJcxhMjtlW3Ok2XKvNrjyPdPuzYVxhG1xzj8CJ8pZDISz0CkJS7YBbqn047Sn yGvA== X-Gm-Message-State: AOAM533keH/8UU4gdqbA6qV3x9BdQvXXDbOyIPciU/ICt7mz6Iwbbao2 OaN4EpCoA1bLjJDB/tihg6V3T77R X-Google-Smtp-Source: ABdhPJzCf4JRJwyFaxjY1r7qWm9mbE2cjT3C49sTWvsyetJzRnIvfCy46vl2cCAJpE9tNMHeIW6PDQ== X-Received: by 2002:a05:651c:310:: with SMTP id a16mr554157ljp.250.1597270446684; Wed, 12 Aug 2020 15:14:06 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id t19sm685386ljc.137.2020.08.12.15.14.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 15:14:06 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 Aug 2020 01:14:05 +0300 Message-Id: <20200812221405.25604-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/mpegts: only reset timestamps to NOPTS for DVB teletext X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" While having the possibility of non-NOPTS values that can suddenly jump in time due to adjustments to match PCR is not nice for DVB subtitles, apparently the parser for this format bases its behavior on whether the packets' timestamps are NOPTS or not. Thus while we can adjust timestamps, we should exclude DVB subtitles from the timestamp unsetting logic. Fixes #8844 --- libavformat/mpegts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index f71f18a57d..50d4d5e9bc 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1343,7 +1343,8 @@ skip: } } - if (!pcr_found) { + if (pes->st->codecpar->codec_id == AV_CODEC_ID_DVB_TELETEXT && + !pcr_found) { av_log(pes->stream, AV_LOG_VERBOSE, "Forcing DTS/PTS to be unset for a " "non-trustworthy PES packet for PID %d as "