From 30cbc4cd9d49689b7be4c944b84d6f6082712a5e Mon Sep 17 00:00:00 2001 From: rigaya Date: Sat, 2 Dec 2023 18:32:23 +0900 Subject: [PATCH] =?UTF-8?q?=E8=AD=A6=E5=91=8A=E5=AF=BE=E7=AD=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NVEncCore/rgy_input_avcodec.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NVEncCore/rgy_input_avcodec.cpp b/NVEncCore/rgy_input_avcodec.cpp index 46e0daf9..c16c2201 100644 --- a/NVEncCore/rgy_input_avcodec.cpp +++ b/NVEncCore/rgy_input_avcodec.cpp @@ -650,7 +650,7 @@ void RGYInputAvcodec::hevcMp42Annexb(AVPacket *pkt) { m_hevcMp42AnnexbBuffer.insert(m_hevcMp42AnnexbBuffer.end(), SC, SC + 4); m_hevcMp42AnnexbBuffer.insert(m_hevcMp42AnnexbBuffer.end(), ptr, ptr + size); ptr += size; } - if (pkt->buf->size < m_hevcMp42AnnexbBuffer.size() + AV_INPUT_BUFFER_PADDING_SIZE) { + if (pkt->buf->size < (int)m_hevcMp42AnnexbBuffer.size() + AV_INPUT_BUFFER_PADDING_SIZE) { av_grow_packet(pkt, (int)m_hevcMp42AnnexbBuffer.size() + AV_INPUT_BUFFER_PADDING_SIZE); } memcpy(pkt->data, m_hevcMp42AnnexbBuffer.data(), m_hevcMp42AnnexbBuffer.size()); @@ -2482,9 +2482,9 @@ std::tuple>> RGYInputAvcod if (m_fpPacketList) { fprintf(m_fpPacketList.get(), "stream %2d, %12s, %s, %s,%5lld,%2d, %12lld\n", pkt->stream_index, avcodec_get_name(m_Demux.format.formatCtx->streams[pkt->stream_index]->codecpar->codec_id), - pkt->pts == AV_NOPTS_VALUE ? " Unknown" : strsprintf("%12lld", pkt->pts).c_str(), - pkt->dts == AV_NOPTS_VALUE ? " Unknown" : strsprintf("%12lld", pkt->dts).c_str(), - pkt->duration, pkt->flags, pkt->pos); + pkt->pts == AV_NOPTS_VALUE ? " Unknown" : strsprintf("%12lld", (long long int)pkt->pts).c_str(), + pkt->dts == AV_NOPTS_VALUE ? " Unknown" : strsprintf("%12lld", (long long int)pkt->dts).c_str(), + (long long int)pkt->duration, pkt->flags, (long long int)pkt->pos); } if (pkt->stream_index == m_Demux.video.index) { if (pkt->flags & AV_PKT_FLAG_CORRUPT) {