Determine if frame is partial due to seek
| 2709 | |
| 2710 | // Determine if frame is partial due to seek |
| 2711 | bool 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 |
| 2728 | void FFmpegReader::CheckWorkingFrames(int64_t requested_frame) { |
nothing calls this directly
no outgoing calls
no test coverage detected