From 8184d80a9a2cfe370b3066bc5401d29e5cd26cd1 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 7 Aug 2012 18:00:28 -0700 Subject: [PATCH] Bug 567077 - Fix an assertion failure when the decoder was cloned. r=cpearce --- content/html/content/src/nsHTMLMediaElement.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp index b58f2cc6b0ef..47137b4477c5 100644 --- a/content/html/content/src/nsHTMLMediaElement.cpp +++ b/content/html/content/src/nsHTMLMediaElement.cpp @@ -1041,6 +1041,11 @@ nsresult nsHTMLMediaElement::LoadResource() if (other) { // Clone it. nsresult rv = InitializeDecoderAsClone(other->mDecoder); + // Get the mimetype from the element we clone, since we will not get it via + // the channel, and we won't be able to sniff for it, because we will not + // open a channel to get the beginning of the media (it is likely to already + // be in the cache). + mMimeType = other->mMimeType; if (NS_SUCCEEDED(rv)) return rv; }