Decoded video frames could be missing or pending forever.

RESOLVED FIXED in Firefox 56

Status

()

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: jhlin, Assigned: jhlin)

Tracking

unspecified
Firefox 56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

a year ago
Missing frames: During draining, RemoteDataDecoder::ReturnDecodedData() could incorrectly return empty decoded data before draining is actually complete. When that happens, no more Drain() will be called and all pending frames will be lost. It should check if mDrainStatus is DRAINED or not.

Pending forever: CodecProxy stops notifying input status once it receives EOS input. That was necessary for the old onInputExhausted() callback but is not the right behavior for onInputStatus() which native implementation requires to resolve promise.
(Assignee)

Updated

a year ago
Assignee: nobody → jolin
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 3

a year ago
mozreview-review
Comment on attachment 8890299 [details]
Bug 1384495 - p2: resolve drain promise with empty decoded data only when draining complete.

https://reviewboard.mozilla.org/r/161416/#review166720

::: dom/media/platforms/android/RemoteDataDecoder.cpp:612
(Diff revision 1)
>    // We only want to clear mDecodedData when we have resolved the promises.
>    if (!mDecodePromise.IsEmpty()) {
>      mDecodePromise.Resolve(mDecodedData, __func__);
>      mDecodedData.Clear();
>    } else if (!mDrainPromise.IsEmpty()) {
> +    if (!mDecodedData.IsEmpty() || mDrainStatus == DrainStatus::DRAINED) {

please merge the two logical expressions (so it's all in else if (...)
Attachment #8890299 - Flags: review?(jyavenard) → review+

Comment 4

a year ago
mozreview-review
Comment on attachment 8890298 [details]
Bug 1384495 - p1: remove end of input flag.

https://reviewboard.mozilla.org/r/161414/#review166750
Attachment #8890298 - Flags: review?(esawin) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 7

a year ago
Pushed by jolin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4c847269e1c8
p1: remove end of input flag. r=esawin
https://hg.mozilla.org/integration/autoland/rev/e53245c9e2a8
p2: resolve drain promise with empty decoded data only when draining complete. r=jya

Comment 8

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4c847269e1c8
https://hg.mozilla.org/mozilla-central/rev/e53245c9e2a8
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56

Updated

a year ago
Blocks: 1375389
You need to log in before you can comment on or make changes to this bug.