Handle audio decoder resets from a SourceBuffer by switching to the new audio decoder

RESOLVED FIXED in mozilla34

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: kinetik, Assigned: kinetik)

Tracking

(Blocks: 1 bug)

Trunk
mozilla34
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Spinning off from bug 1041374.  Addressed review comments from that bug and rearranged the code a bit.
(Assignee)

Updated

5 years ago
Blocks: 778617

Comment 2

5 years ago
Comment on attachment 8475627 [details] [diff] [review]
Handle audio decoder resets from a SourceBuffer by switching to the new audio decoder. v2

Review of attachment 8475627 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/mediasource/MediaSourceReader.cpp
@@ +218,5 @@
>      SubBufferDecoder* decoder = mDecoders[i];
>  
> +    const MediaInfo& info = decoder->GetReader()->GetMediaInfo();
> +
> +    double decodeTarget = double(mTimeThreshold) / USECS_PER_S;

We should be able to move this outside the loop I think.
Attachment #8475627 - Flags: review?(cajbir.bugzilla) → review+

Comment 3

5 years ago
Comment on attachment 8475627 [details] [diff] [review]
Handle audio decoder resets from a SourceBuffer by switching to the new audio decoder. v2

Review of attachment 8475627 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/mediasource/MediaSourceReader.cpp
@@ +238,5 @@
> +      if (info.HasAudio()) {
> +        didSwitch = SwitchAudioReader(mDecoders[i]->GetReader());
> +      }
> +      if (info.HasVideo()) {
> +        didSwitch = SwitchVideoReader(mDecoders[i]->GetReader());

Should these be "didSwitch |=" so we don't lose information if a later decoder doesn't switch?
(Assignee)

Comment 4

5 years ago
Yep.  I'll change that and comment 2 on commit.
https://hg.mozilla.org/mozilla-central/rev/16cad9b4140c
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.