diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2019-04-30 22:03:37 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2019-05-02 20:16:40 +0200 |
commit | 1eac5fa2fd661f9572fb9f9b30e2785c0d5b513a (patch) | |
tree | edcc584185b5cb674f3d6dc89603f54da831b6ce /avmedia/source | |
parent | 4729385ae828a178fbe0ab4fb8ec52134723b5e6 (diff) |
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@cib.de>
Diffstat (limited to 'avmedia/source')
-rw-r--r-- | avmedia/source/framework/MediaControlBase.cxx | 2 | ||||
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 2 |
2 files changed, 3 insertions, 1 deletions
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(); |