Decoded video frames could be missing or pending forever.

RESOLVED FIXED in Firefox 56

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jhlin, Assigned: jhlin)

Tracking

unspecified
Firefox 56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(2 attachments)

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: nobody → jolin
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 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+
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
https://hg.mozilla.org/mozilla-central/rev/4c847269e1c8
https://hg.mozilla.org/mozilla-central/rev/e53245c9e2a8
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Blocks: 1375389
You need to log in before you can comment on or make changes to this bug.