BugFix MediaPlayer first PTS used for rewind video

Also shows the gap in the video timeline
This commit is contained in:
Bruno Herbelin
2023-08-11 17:16:07 +02:00
parent 57154e5d0b
commit 1413490579
2 changed files with 10 additions and 0 deletions

View File

@@ -1495,6 +1495,9 @@ bool MediaPlayer::fill_frame(GstBuffer *buf, FrameStatus status)
// set the start position (i.e. pts of first frame we got)
if (timeline_.first() == GST_CLOCK_TIME_NONE) {
timeline_.setFirst(buf->pts);
// add a gap to show that before
if (buf->pts > 0 && !timeline_.gapAt( buf->pts ))
timeline_.addGap(0, buf->pts);
}
}
// full but invalid frame : will be deleted next iteration