Closed Bug 1384495 Opened 6 years ago Closed 6 years ago

Decoded video frames could be missing or pending forever.


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

Not set


(firefox56 fixed)

Firefox 56
Tracking Status
firefox56 --- fixed


(Reporter: jhlin, Assigned: jhlin)




(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.

::: 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.
Attachment #8890298 - Flags: review?(esawin) → review+
Pushed by
p1: remove end of input flag. r=esawin
p2: resolve drain promise with empty decoded data only when draining complete. r=jya
Closed: 6 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.