Skip to content

Fix seeking after repeat

Nicolas Pomepuy requested to merge Aza/vlc-android:fix_seeking into master

I'd like @Dekans to review this commit as it may have side effects I couldn't think of!

Description

When playing a video in repeat mode, after the first loop, the seek was broken.

Technical explanation:

When seeking the time is retrieved by VideoPlayerActivity.time. This time is calculated and take VideoPlayerActivity.forcedTime into account. This parameter was not reset when the loop ended resulting in its value being larger than the video's length. This commit only resets it when the MediaPlayer.Event.Opening event is raised.

Motivation and Context

How Has This Been Tested?

Screenshots / GIFs (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking change which cleans up / improves existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the CONTRIBUTING section of the README document.

Resolves

Fixes: #939 (closed)

Edited by Nicolas Pomepuy

Merge request reports