Bug 1231793: Part 3 - Fixed reading of Metadata tags. r=jya draft
authorLouis Christie <lchristie@mozilla.com>
Fri, 12 Feb 2016 14:40:19 +1300
changeset 331188 ff28cbba478d59660ba429b554b9c52010f7703d
parent 331187 46b436ff588ba8d017133da3946d6f128ade0c24
child 331189 fcaa4ff021bca8433e0c08c0476aed9ca18c9e1f
push id10927
push userbmo:jyavenard@mozilla.com
push dateTue, 16 Feb 2016 13:22:28 +0000
reviewersjya
bugs1231793
milestone47.0a1
Bug 1231793: Part 3 - Fixed reading of Metadata tags. r=jya
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -336,17 +336,17 @@ MediaFormatReader::OnDemuxerInitDone(nsr
   if (!videoActive && !audioActive) {
     mMetadataPromise.Reject(ReadMetadataFailureReason::METADATA_ERROR, __func__);
     return;
   }
 
   mInitDone = true;
   RefPtr<MetadataHolder> metadata = new MetadataHolder();
   metadata->mInfo = mInfo;
-  metadata->mTags = nullptr;
+  metadata->mTags = tags->Count() ? tags.release() : nullptr;
   mMetadataPromise.Resolve(metadata, __func__);
 }
 
 void
 MediaFormatReader::OnDemuxerInitFailed(DemuxerFailureReason aFailure)
 {
   mDemuxerInitRequest.Complete();
   mMetadataPromise.Reject(ReadMetadataFailureReason::METADATA_ERROR, __func__);