MCPcopy Create free account
hub / github.com/FFMS/ffms2 / MaybeHideFrames

Method MaybeHideFrames

src/core/track.cpp:259–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259void FFMS_Track::MaybeHideFrames() {
260 frame_vec &Frames = Data->Frames;
261 // Awful handling for interlaced H.264: each frame is output twice, so hide
262 // frames with an invalid file position. The PTS will not match sometimes,
263 // since libavformat makes up timestamps... but only sometimes.
264 for (size_t i = 1; i < size(); ++i) {
265 FrameInfo const& prev = Frames[i - 1];
266 FrameInfo& cur = Frames[i];
267
268 if (prev.FilePos >= 0 && (cur.FilePos == -1 || cur.FilePos == prev.FilePos) && !prev.Skipped())
269 cur.MarkedHidden = true;
270 }
271}
272
273void FFMS_Track::FillAudioGaps() {
274 frame_vec &Frames = Data->Frames;

Callers 1

FinalizeMethod · 0.80

Calls 1

SkippedMethod · 0.80

Tested by

no test coverage detected