Bug 1159366 - Check for 'sidx' box in ContainerParser. r=jya, a=sledru
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 20 May 2015 16:29:00 +1200
changeset 274717 025477515ea4b30d479db3d7d414a294baf27984
parent 274716 055f05c95d1a010aa1d6a14d8dc30cd5dc1c9160
child 274718 fb66d813383e8914da4b3baa5a2c3e6a62140931
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya, sledru
bugs1159366
milestone40.0a2
Bug 1159366 - Check for 'sidx' box in ContainerParser. r=jya, a=sledru
dom/media/mediasource/ContainerParser.cpp
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -272,17 +272,19 @@ public:
     uint32_t chunk_size = BigEndian::readUint32(aData->Elements());
     if (chunk_size < 8) {
       return false;
     }
 
     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');
+            (*aData)[7] == 'p') ||
+           ((*aData)[4] == 's' && (*aData)[5] == 'i' && (*aData)[6] == 'd' &&
+            (*aData)[7] == 'x');
   }
 
   bool ParseStartAndEndTimestamps(MediaLargeByteBuffer* aData,
                                   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);