Skip to content

Commit 8a96be4

Browse files
committed
fix(avformat): 断言为 int32 再转为 int64
1 parent 6aa92af commit 8a96be4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/avformat/formats/IRtspFormat.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ export default class IRtspFormat extends IFormat {
314314
const context = stream.privData as RtspStreamContext
315315

316316
if (context.lastRtcpNtpTime !== NOPTS_VALUE_BIGINT && formatContext.streams.length > 1) {
317-
const deltaTimestamp = static_cast<int64>(timestamp - context.lastRtcpTimestamp)
317+
const deltaTimestamp = static_cast<int64>((timestamp - context.lastRtcpTimestamp) as int32)
318318
const addend = (context.lastRtcpNtpTime - context.firstRtcpNtpTime) * static_cast<int64>(stream.timeBase.den)
319319
/ (static_cast<int64>(stream.timeBase.num) << 32n)
320320

0 commit comments

Comments
 (0)