MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / GetPacketPTS

Method GetPacketPTS

src/FFmpegReader.cpp:2470–2482  ·  view source on GitHub ↗

Get the PTS for the current video packet

Source from the content-addressed store, hash-verified

2468
2469// Get the PTS for the current video packet
2470int64_t FFmpegReader::GetPacketPTS() {
2471 if (packet) {
2472 int64_t current_pts = packet->pts;
2473 if (current_pts == AV_NOPTS_VALUE && packet->dts != AV_NOPTS_VALUE)
2474 current_pts = packet->dts;
2475
2476 // Return adjusted PTS
2477 return current_pts;
2478 } else {
2479 // No packet, return NO PTS
2480 return AV_NOPTS_VALUE;
2481 }
2482}
2483
2484// Update PTS Offset (if any)
2485void FFmpegReader::UpdatePTSOffset() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected