Bug 1116883 - Allow segment type box at the beginning of a media segment per spec. r=karlt
authorBobby Holley <bobbyholley@gmail.com>
Wed, 07 Jan 2015 15:58:55 -0800
changeset 222542 a909e2281ed1d54d44236a405e61b8aca735a636
parent 222541 467595d3992901497c87fa93b465b9079b22bc5b
child 222543 20ab622b36c1ce9d9904d8daaf22562a07e820c4
push id28068
push usercbook@mozilla.com
push dateThu, 08 Jan 2015 13:16:34 +0000
treeherdermozilla-central@2880e05d5e32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1116883
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1116883 - Allow segment type box at the beginning of a media segment per spec. r=karlt
dom/media/mediasource/ContainerParser.cpp
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -232,18 +232,18 @@ public:
       return false;
     }
 
     uint32_t chunk_size = BigEndian::readUint32(aData);
     if (chunk_size < 8) {
       return false;
     }
 
-    return aData[4] == 'm' && aData[5] == 'o' && aData[6] == 'o' &&
-           aData[7] == 'f';
+    return (aData[4] == 'm' && aData[5] == 'o' && aData[6] == 'o' && aData[7] == 'f') ||
+           (aData[4] == 's' && aData[5] == 't' && aData[6] == 'y' && aData[7] == 'p');
   }
 
   bool ParseStartAndEndTimestamps(const uint8_t* aData, uint32_t aLength,
                                   int64_t& aStart, int64_t& aEnd)
   {
     MonitorAutoLock mon(mMonitor); // We're not actually racing against anything,
                                    // but mParser requires us to hold a monitor.
     bool initSegment = IsInitSegmentPresent(aData, aLength);