From b7d2b0b2573547fa1ad81338e5bfeb642018f89e Mon Sep 17 00:00:00 2001 From: rigaya Date: Thu, 3 Aug 2023 20:54:28 +0900 Subject: [PATCH] =?UTF-8?q?=E7=BD=AE=E3=81=8D=E6=8F=9B=E3=81=88=E7=94=A8?= =?UTF-8?q?=E3=81=AE=E6=98=A0=E5=83=8F=E3=81=AE=E8=B5=B7=E7=82=B9=E3=81=8C?= =?UTF-8?q?0=E3=81=A7=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=81=AE?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E4=BF=AE=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/rgy_version.h | 6 +++--- app/tsreplace.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/rgy_version.h b/app/rgy_version.h index fc8e72a..f7c01c8 100644 --- a/app/rgy_version.h +++ b/app/rgy_version.h @@ -31,9 +31,9 @@ #include "rgy_rev.h" -#define VER_FILEVERSION 0,0,3,0 -#define VER_STR_FILEVERSION "0.03" -#define VER_STR_FILEVERSION_TCHAR _T("0.03") +#define VER_FILEVERSION 0,0,4,0 +#define VER_STR_FILEVERSION "0.04" +#define VER_STR_FILEVERSION_TCHAR _T("0.04") #ifdef _M_IX86 #define BUILD_ARCH_STR _T("x86") diff --git a/app/tsreplace.cpp b/app/tsreplace.cpp index 13b51b3..0afa5e2 100644 --- a/app/tsreplace.cpp +++ b/app/tsreplace.cpp @@ -1220,8 +1220,8 @@ RGY_ERR TSReplace::writeReplacedVideo(AVPacket *avpkt) { const bool replaceToHEVC = m_video->getVidCodecID() == AV_CODEC_ID_HEVC; const bool addAud = m_addAud && !has_aud; const bool addHeader = m_addHeaders && isKey && !has_header; - const auto pts = av_rescale_q(avpkt->pts, m_video->getVidTimebase(), av_make_q(1, TS_TIMEBASE)) + m_vidFirstTimestamp; - const auto dts = av_rescale_q(avpkt->dts, m_video->getVidTimebase(), av_make_q(1, TS_TIMEBASE)) + m_vidFirstTimestamp; + const auto pts = av_rescale_q(avpkt->pts - m_video->getFirstKeyPts(), m_video->getVidTimebase(), av_make_q(1, TS_TIMEBASE)) + m_vidFirstTimestamp; + const auto dts = av_rescale_q(avpkt->dts - m_video->getFirstKeyPts(), m_video->getVidTimebase(), av_make_q(1, TS_TIMEBASE)) + m_vidFirstTimestamp; int add_aud_len = (addAud) ? ((replaceToHEVC) ? 7 : 6) : 0; const uint8_t *header = nullptr;