Closed Bug 1094549 Opened 10 years ago Closed 10 years ago

MediaCacheStream::Read get stuck when stream length is zero

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jwwang, Assigned: jwwang)

Details

Attachments

(2 files)

1. MediaCacheStream::Read is called when mStreamLength is -1
2. It waits for data at http://hg.mozilla.org/mozilla-central/file/72ae882fce1a/dom/media/MediaCache.cpp#l2232
3. MediaCacheStream::NotifyDataEnded is called for download is finished.
4. MediaCacheStream::FlushPartialBlockInternal(true) is called by MediaCacheStream::NotifyDataEnded.
5. FlushPartialBlockInternal doesn't notify the readers for blockOffset is 0
6. MediaCacheStream::Read waits for data to come endlessly.
An error event should fire when decoding a zero-length file for decoding metadata will fail. It tests if MediaCacheStream::Read() gets stuck in waiting for data that will never come.
Assignee: nobody → jwwang
Status: NEW → ASSIGNED
Attachment #8518174 - Flags: review?(roc)
MediaCacheStream::FlushPartialBlockInternal should notify all readers even when channel offset is zero.
Attachment #8518175 - Flags: review?(roc)
Comment on attachment 8518175 [details] [diff] [review]
1094549_part2_fix_MediaCacheStream_Read_hang.patch

Review of attachment 8518175 [details] [diff] [review]:
-----------------------------------------------------------------

Good work!
Attachment #8518175 - Flags: review?(roc) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/aad9ef4320b8
https://hg.mozilla.org/mozilla-central/rev/88c90de8b7c6
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: