Open Bug 1421505 Opened 2 years ago Updated 1 year ago

The AudioEndTime() returns wrong value once media starts seamlessly looping


(Core :: Audio/Video: Playback, defect, P3)





(Reporter: chunmin, Assigned: chunmin)




(1 file)

The AudioEndTime()[0] will return a time that is over the end of the track after the media is looped seamlessly. Looping or not, it should return the correct end time.

Assignee: nobody → cchang
Blocks: 654787
Comment on attachment 8941752 [details]
Bug 1421505 - Return the correct duration while seamless looping is on;

::: dom/media/MediaDecoderStateMachine.cpp:3691
(Diff revision 1)
>  TimeUnit
>  MediaDecoderStateMachine::AudioEndTime() const
>  {
>    MOZ_ASSERT(OnTaskQueue());
> +  if (mReader->GetDuration().IsValid()) {

AudioEndTime() is not the duration. It is the end time of the last audio frame that's been pushed onto the media sink which changes constantly as we push more frames to the audio sink.
Attachment #8941752 - Flags: review?(jwwang) → review-
This should be fixed in MediaSink, but MediaSink doesn't know the seamless-looping is on or not. This will be fixed when we figure out how to pass the seamless-looping info to MediaSink.
See Also: → 1487797
You need to log in before you can comment on or make changes to this bug.