[Media Controller] Disallow seeking beyond end of track
Needs RevisionPublic

Authored by broulik on Oct 1 2018, 11:32 AM.

Details

Reviewers
fvogt
Group Reviewers
Plasma
Summary

A track of 60 seconds length has the valid positions [0,59] so subtract -1

Test Plan

No longer issues SetPosition command with invalid bounds

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Oct 1 2018, 11:32 AM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 1 2018, 11:32 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Oct 1 2018, 11:32 AM
fvogt added a comment.Oct 1 2018, 11:49 AM

I'm not sure whether that's correct - a file with a duration of 1s still has a range of 1s.

anthonyfieroni added a subscriber: anthonyfieroni.EditedOct 1 2018, 12:10 PM

1s file is a corner case as well as 0, cause you have always 2 positions - start and stop. In 0/1s these 2 steps just match, if you are right 0 isn't valid in 0s length file, does it?
+1 for the patch from me.

fvogt requested changes to this revision.Jul 5 2019, 12:03 PM

1s file is a corner case as well as 0, cause you have always 2 positions - start and stop.

The slider's value is floating point, so you also have the (theoretically) infinite positions in between.

In 0/1s these 2 steps just match, if you are right 0 isn't valid in 0s length file, does it?

A file with 0s length can't be seeked.

This revision now requires changes to proceed.Jul 5 2019, 12:03 PM