From 95a69937bd05e89a16195f94e7ca81f607e4897a Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Sat, 26 Feb 2022 22:32:37 +0100 Subject: [PATCH] BugFix Mediaplayer loop and info mediaplayer --- InfoVisitor.cpp | 2 +- MediaPlayer.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/InfoVisitor.cpp b/InfoVisitor.cpp index fcffae1..ef0e365 100644 --- a/InfoVisitor.cpp +++ b/InfoVisitor.cpp @@ -224,7 +224,7 @@ void InfoVisitor::visit (CloneSource& s) oss << "Clone of '" << s.origin()->name() << "' "; oss << CloneSource::cloning_provenance_label[s.cloningProvenance()] << std::endl; oss << (s.frame()->use_alpha() ? "RGBA, " : "RGB, "); - oss << (int)(s.delay()*100.0) << " ms delay " << std::endl; + oss << (int)(s.delay()*1000.0) << " ms delay " << std::endl; oss << s.frame()->width() << " x " << s.frame()->height(); } } diff --git a/MediaPlayer.cpp b/MediaPlayer.cpp index 025d9bc..9c6c54a 100644 --- a/MediaPlayer.cpp +++ b/MediaPlayer.cpp @@ -1013,9 +1013,8 @@ void MediaPlayer::update() } // manage loop mode - if (need_loop) { + if (need_loop) execute_loop_command(); - } force_update_ = false; } @@ -1030,7 +1029,8 @@ void MediaPlayer::execute_loop_command() execute_seek_command(); } else { //LOOP_NONE - play(false); + if (desired_state_ == GST_STATE_PLAYING) // avoid repeated call + play(false); } }