Kaydet (Commit) 18975274 authored tarafından Mark Hung's avatar Mark Hung

tdf#40780 extend default media duration from 0.01s to 0.3s.

Player can only update the duration when the state of the
GStreamer pipeline changes. But GStreamer need some time to get
ready. However the default duration (0.01s) is so short that
the audio node is deactivated before the duration update.
Hence I just pick up a value that is long enough to allow
update happen empirically.

Change-Id: If94133fde09e414bd9ea3c4b162a13d5c70f4524
Reviewed-on: https://gerrit.libreoffice.org/67783
Tested-by: Jenkins
Reviewed-by: 's avatarMark Hung <marklh9@gmail.com>
üst 31221c4f
......@@ -735,7 +735,7 @@ double SAL_CALL Player::getDuration()
::osl::MutexGuard aGuard(m_aMutex);
// slideshow checks for non-zero duration, so cheat here
double duration = 0.01;
double duration = 0.3;
if( mpPlaybin && mnDuration > 0 ) {
duration = mnDuration / GST_SECOND;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment