The mDuration field of VideoData in MediaSourceReader::OnVideoDecoded is incorrect with WebM

RESOLVED FIXED in mozilla35

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cajbir, Assigned: kinetik)

Tracking

(Blocks: 1 bug)

unspecified
mozilla35
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
If a SourceBufferDecoder reaches the end of its data then the associated WebMReader uses GetMediaEndTime to compute the sample duration, taking that time as the time of the next sample.

SourceBufferDecoder::GetMediaEndTime returns the duration of the resource which results in the computed sample time being incorrect. 

Is it safe to change GetMediaEndTime to return the time of the last item in the buffered data for the SourceBufferDecoder? Or do we change WebMReader's behaviour here.
(Reporter)

Updated

5 years ago
Blocks: 778617
(Assignee)

Comment 2

5 years ago
Not sure how I managed that, but I posted bug 1061402's comment here and this bug's comment there.  Made it private to avoid confusion.  Intended comment:

As far as I can tell, GetEndMediaTime is only used by the WebMReader.  I think it's confusing given the existence of GetMediaDuration.  My preference is to remove it entirely, and compute the last frame duration in WebMReader using the Δt between the current and previous frame as the frame duration.
(Assignee)

Comment 3

5 years ago
Created attachment 8483358 [details] [diff] [review]
Compute WebM frame duration from Δt of last frame.

Proposed fix.
Attachment #8483358 - Flags: review?(cajbir.bugzilla)
(Reporter)

Updated

5 years ago
Attachment #8483358 - Flags: review?(cajbir.bugzilla) → review+
https://hg.mozilla.org/mozilla-central/rev/b83d8447aaaa
Assignee: nobody → kinetik
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
(Assignee)

Updated

5 years ago
Blocks: 1064699
You need to log in before you can comment on or make changes to this bug.