Closed Bug 1384495 Opened 7 years ago Closed 7 years ago

Decoded video frames could be missing or pending forever.

Categories

(Firefox for Android Graveyard :: Audio/Video, enhancement)

enhancement
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: jhlin, Assigned: jhlin)

References

Details

Attachments

(2 files)

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: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Blocks: 1375389
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.