Media element playback time should be in range [startTime,startTime+duration]

RESOLVED DUPLICATE of bug 498253

Status

()

Core
Audio/Video
RESOLVED DUPLICATE of bug 498253
8 years ago
8 years ago

People

(Reporter: cpearce, Unassigned)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

In void nsOggDecodeStateMachine::Seek(float aTime) we assert:

 mSeekTime = aTime + mPlaybackStartTime;
 float duration = static_cast<float>(mDuration) / 1000.0;
 NS_ASSERTION(mSeekTime >= 0 && mSeekTime <= duration,
              "Can only seek in range [0,duration]");

That's wrong. mSeekTime is in range [mPlaybackStartTime, mPlaybackStartTime+duration], so the assertion should be:

 NS_ASSERTION(mSeekTime >= mPlaybackStartTime &&
              mSeekTime <= (mPlaybackStartTime + duration),
              "Can only seek in range [start,end]");

We should probably assert that the passed in time (aTime) is in range [0,duration], at least until we update the start time to match the current spec, which exposes HTMLMediaElement.currentTime to be in the range [HTMLMediaElement.startTime, startTime+duration_of_all_concatenated_segments] rather than [0,duration] as we currently implement.

See: http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-currenttime
Ok, the new Ogg decoder backend implemented the assertion as my comment 1, but we're still not matching the spec. We still start playback at time 0, and end it at time |duration|. Playback should start at time HTMLMediaElement.startTime, and finish at |startTime+duration|.
Summary: nsOggDecodeStateMachine::Seek(float) assertion incorrect → Media element playback time should be in range [startTime,startTime+duration]
(In reply to comment #1)
> Playback should start at time
> HTMLMediaElement.startTime, and finish at |startTime+duration|.

This is bug 498253.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 498253
You need to log in before you can comment on or make changes to this bug.