summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2019-02-13 23:25:08 +0800
committerMark Hung <marklh9@gmail.com>2019-02-15 14:38:28 +0100
commit18975274ddc585cc3e3e8b6ae5c2800b27723444 (patch)
tree27ef506b77add6ab9fdcf94d36c7617c2a08144c
parent31221c4f8fb1973d246fcf8f50886cf5811e8054 (diff)
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: Mark Hung <marklh9@gmail.com>
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 46432c764698..a81c386cc3c3 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -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;