Closed Bug 1320684 Opened 3 years ago Closed 3 years ago

Metadata decoding started before any data is available

Categories

(Core :: ImageLib, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: aosmond, Assigned: aosmond)

Details

(Whiteboard: gfx-noted)

Attachments

(1 file)

Metadata decoding is typically initiated in RasterImage::Init:

http://searchfox.org/mozilla-central/rev/957458d8fa2328c2a760dbb30e7f1f1efa55b4d0/image/RasterImage.cpp#151

as eventually called by imgRequest::OnDataAvailable:

http://searchfox.org/mozilla-central/rev/957458d8fa2328c2a760dbb30e7f1f1efa55b4d0/image/imgRequest.cpp#1074

However the data isn't fed into the source buffer until a few lines later:

http://searchfox.org/mozilla-central/rev/957458d8fa2328c2a760dbb30e7f1f1efa55b4d0/image/imgRequest.cpp#1109

We should wait to dispatch the decoding task until there is actual data, otherwise it will probably just go to sleep as soon as it starts, and then wait to get resumed.
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: gfx-noted
Attachment #8814911 - Flags: review?(tnikkel) → review+
Don't forget to land this.
Flags: needinfo?(aosmond)
Pushed by aosmond@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5186852360d6
Start metadata decoding when the first data chunk has been received. r=tnikkel
Done! Thanks for the reminder.
Flags: needinfo?(aosmond)
https://hg.mozilla.org/mozilla-central/rev/5186852360d6
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.