Closed Bug 1022468 Opened 6 years ago Closed 6 years ago

Infinite loop reading small-shot.m4a in MP4Reader

Categories

(Core :: Audio/Video, defect)

29 Branch
x86_64
Windows 8.1
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: cpearce, Assigned: cpearce)

Details

Attachments

(1 file)

If you load small-shot.m4a from a local file on Windows in the MP4Reader, you get stuck in a loop. The problem is that MP4Stream::ReadAt() isn't detecting end of stream correctly. When we reach EOS, MediaResource::ReatAt() report 0 bytes read and returns success. But when that happens we're not getting out of the loop in MP4Stream::ReadAt(), as that only exits if MediaResource::ReatAt() returns failure or if we read the requested number of bytes.
Attached patch PatchSplinter Review
Fix: Exit loop on EOS.
Attachment #8436649 - Flags: review?(ajones)
Attachment #8436649 - Flags: review?(ajones) → review+
If this is a difference between the way a local file works compared to a network connection then this should probably be fixed closer to the root of the problem.
https://hg.mozilla.org/mozilla-central/rev/1c338d5c07d8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.