Closed
Bug 521176
Opened 15 years ago
Closed 15 years ago
Unnecessary HTTP transaction when cloning media decoder
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: kinetik, Assigned: roc)
Details
Attachments
(1 file)
4.68 KB,
patch
|
cajbir
:
review+
|
Details | Diff | Splinter Review |
nsHTMLMediaElement::InitializeAsClone creates a clone of the original decoder's nsMediaStream then passes it to the clone's nsMediaDecoder::Load which ends up calling AsyncOpen on a fresh nsHttpChannel in nsMediaChannelStream::OpenChannel. The fresh channel was previously created by nsMediaStream::CloneData calling RecreateChannel.
I ran into this while writing a test for bug 520908. Running the test without the fix applied, I expected it to fail consistently. However, it would randomly pass because the cloned decoder's channel would reach OnStartRequest and set the X-Content-Duration duration on the decoder unexpectedly.
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → roc
Assignee | ||
Comment 1•15 years ago
|
||
I'm not sure how to test this.
One way might be to have some .sjs hackery to set up a set of URLs that only work once each, then return 404. Then we could try loading a Wave file, wait for it to play through and then assume it's fully in the cache, clone it, and play through the clone. If the clone does any HTTP transactions we'd get a network error. We could append a random query parameter to the URL used in each test run so the test works if repeated.
Any better ideas?
Attachment #405403 -
Flags: review?(chris.double)
Updated•15 years ago
|
Attachment #405403 -
Flags: review?(chris.double) → review+
Assignee | ||
Comment 2•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•