[Libreoffice-commits] core.git: avmedia/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Feb 15 13:39:01 UTC 2019


 avmedia/source/gstreamer/gstplayer.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 18975274ddc585cc3e3e8b6ae5c2800b27723444
Author:     Mark Hung <marklh9 at gmail.com>
AuthorDate: Wed Feb 13 23:25:08 2019 +0800
Commit:     Mark Hung <marklh9 at gmail.com>
CommitDate: Fri Feb 15 14:38:28 2019 +0100

    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 at gmail.com>

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;


More information about the Libreoffice-commits mailing list