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

Method IsPartialFrame

src/FFmpegReader.cpp:2711–2725  ·  view source on GitHub ↗

Determine if frame is partial due to seek

Source from the content-addressed store, hash-verified

2709
2710// Determine if frame is partial due to seek
2711bool FFmpegReader::IsPartialFrame(int64_t requested_frame) {
2712
2713 // Sometimes a seek gets partial frames, and we need to remove them
2714 bool seek_trash = false;
2715 int64_t max_seeked_frame = seek_audio_frame_found; // determine max seeked frame
2716 if (seek_video_frame_found > max_seeked_frame) {
2717 max_seeked_frame = seek_video_frame_found;
2718 }
2719 if ((info.has_audio && seek_audio_frame_found && max_seeked_frame >= requested_frame) ||
2720 (info.has_video && seek_video_frame_found && max_seeked_frame >= requested_frame)) {
2721 seek_trash = true;
2722 }
2723
2724 return seek_trash;
2725}
2726
2727// Check the working queue, and move finished frames to the finished queue
2728void FFmpegReader::CheckWorkingFrames(int64_t requested_frame) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected