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

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Thu May 2 18:17:43 UTC 2019


 avmedia/source/framework/MediaControlBase.cxx |    2 +-
 avmedia/source/framework/mediacontrol.cxx     |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 1eac5fa2fd661f9572fb9f9b30e2785c0d5b513a
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Tue Apr 30 22:03:37 2019 +0200
Commit:     Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Thu May 2 20:16:40 2019 +0200

    tdf#101524: seeking position shouldn't pause video playback
    
    Change-Id: I846043815cdd41620f96c31843a77bea3d2db82f
    Reviewed-on: https://gerrit.libreoffice.org/71596
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx
index 9cd55282226a..4caedac9db2b 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -163,7 +163,7 @@ void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem)
             mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false );
             mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_STOP, false );
         }
-        else if( aMediaItem.getTime() > 0.0 && ( aMediaItem.getTime() < aMediaItem.getDuration() ) )
+        else if( aMediaItem.getState() == MediaState::Pause )
         {
             mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, false );
             mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE );
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 0988c88c0d13..e194a2296fef 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -274,6 +274,8 @@ IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p, void )
     MediaItem aExecItem;
 
     aExecItem.setTime( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE );
+    // keep state (if the media was playing, keep it playing)
+    aExecItem.setState(maItem.getState());
     execute( aExecItem );
     update();
     maIdle.Start();


More information about the Libreoffice-commits mailing list