mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1111311: Use 32 bits signed for storing CTS in order to properly calculate PTS. r=kentuckyfriedtakahe
This commit is contained in:
parent
66dac7ece8
commit
82b860da6b
@ -318,13 +318,9 @@ Moof::ParseTrun(Box& aBox, Tfhd& aTfhd, Tfdt& aTfdt, Mdhd& aMdhd, Edts& aEdts)
|
||||
flags & 0x400 ? reader->ReadU32() : hasFirstSampleFlags && i == 0
|
||||
? firstSampleFlags
|
||||
: aTfhd.mDefaultSampleFlags;
|
||||
int64_t ctsOffset = 0;
|
||||
int32_t ctsOffset = 0;
|
||||
if (flags & 0x800) {
|
||||
if (version == 0) {
|
||||
ctsOffset = reader->ReadU32();
|
||||
} else {
|
||||
ctsOffset = reader->Read32();
|
||||
}
|
||||
ctsOffset = reader->Read32();
|
||||
}
|
||||
|
||||
Sample sample;
|
||||
|
@ -140,7 +140,7 @@ private:
|
||||
off64_t offset;
|
||||
uint32_t size;
|
||||
uint32_t duration;
|
||||
int64_t ctsOffset;
|
||||
int32_t ctsOffset;
|
||||
uint32_t flags;
|
||||
uint8_t iv[16];
|
||||
Vector<uint16_t> clearsizes;
|
||||
@ -3161,11 +3161,7 @@ status_t MPEG4Source::parseTrackFragmentRun(off64_t offset, off64_t size) {
|
||||
tmp.offset = dataOffset;
|
||||
tmp.size = sampleSize;
|
||||
tmp.duration = sampleDuration;
|
||||
if (version == 0) {
|
||||
tmp.ctsOffset = sampleCtsOffset;
|
||||
} else {
|
||||
tmp.ctsOffset = (int32_t)sampleCtsOffset;
|
||||
}
|
||||
tmp.ctsOffset = (int32_t)sampleCtsOffset;
|
||||
mCurrentSamples.add(tmp);
|
||||
|
||||
dataOffset += sampleSize;
|
||||
|
Loading…
Reference in New Issue
Block a user