Closed Bug 1343156 Opened 7 years ago Closed 7 years ago

Remove unnecessary MP4Metadata::HasCompleteMetadata

Categories

(Core :: Audio/Video: Playback, defect)

53 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

Details

Attachments

(1 file)

`MP4Metadata::HasCompleteMetadata(stream)` is only used in MP4Demuxer::Init(), in which a negative result rejects the InitPromise and a positive result continues on with `Metadata(stream)`.
`MP4Metadata::Metadata()` itself starts with the same operations as `HasCompleteMetadata()`, and effectively has the same effects in case of failure or success.

So calling `HasCompleteMetadata()` is duplicating the work done in `Metadata()`. I think we should just get rid of it; It will also save a bit of work in the upcoming Rust re-implementation.

The only advantage is a more-precise error message in case of incomplete metadata, but a future bug will restore that distinction, directly inside MP4Metadata functions.
(For proof, see "MP4Metadata::Metadata() now also returns a success/error code" patch in WIP Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fa2d45b890d983e1b4c99b25d0a344424565900a )
Comment on attachment 8841872 [details]
Bug 1343156 - Remove unnecessary MP4Metadata::HasCompleteMetadata -

https://reviewboard.mozilla.org/r/115958/#review117374
Attachment #8841872 - Flags: review?(jyavenard) → review+
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/67617bd5c3e8
Remove unnecessary MP4Metadata::HasCompleteMetadata - r=jya
https://hg.mozilla.org/mozilla-central/rev/67617bd5c3e8
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.