Skip to content

Commit

Permalink
置き換え用の映像の起点が0でない場合の処理を修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Aug 3, 2023
1 parent 90e8394 commit b7d2b0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/rgy_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions app/tsreplace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b7d2b0b

Please sign in to comment.