BugFix MediaPlayer seek, avoid blocking wait

This commit is contained in:
Bruno Herbelin
2025-03-30 11:51:15 +02:00
parent 15eb546c3d
commit 9f208ee7d2

View File

@@ -1346,10 +1346,9 @@ void MediaPlayer::update()
frame_[read_index].access.unlock();
// if already seeking (asynch)
if (seeking_) {
// request status update to pipeline (re-sync gst thread)
gst_element_get_state (pipeline_, NULL, NULL, GST_CLOCK_TIME_NONE);
// seek should be resolved next frame
// && request status update to pipeline (re-sync gst thread)
if (seeking_ && gst_element_get_state(pipeline_, NULL, NULL, GST_MSECOND * 5)==GST_STATE_CHANGE_SUCCESS) {
// seek is resolved for next frame
seeking_ = false;
// do NOT do another seek yet
need_loop = false;