Skip to content

Commit

Permalink
fix(demux): 使用码流数据对应的时间戳,忽略 extradata 的时间戳
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaohappy committed Jan 20, 2025
1 parent 0d717b5 commit 0a166a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/avformat/demux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ async function packetNeedRead(formatContext: AVIFormatContext, avpacket: pointer
if (tmpPacket.streamIndex === avpacket.streamIndex) {
if (tmpPacket.size) {
copyAVPacketData(avpacket, tmpPacket)
avpacket.dts = tmpPacket.dts
avpacket.pts = tmpPacket.pts
destroyAVPacket(tmpPacket)
return 0
}
Expand Down

0 comments on commit 0a166a2

Please sign in to comment.