Fixed more errors

This commit is contained in:
Damiano Galassi committed 2015-08-20 14:47:10 +02:00
1 parent f2ccd9e1d6
commit 9e3554d6df
4 files changed
+50 -27

No files matched your search

+17 -6
View File
@@ -130,18 +130,29 @@
for (i = 0; i < spsCount; i++) {
uint16_t spsSize = (avcCAtom[ptrPos++] << 8) & 0xff00;
spsSize += avcCAtom[ptrPos++] & 0xff;
MP4AddH264SequenceParameterSet(_fileHandle, dstTrackId,
avcCAtom+ptrPos, spsSize);
ptrPos += spsSize;
if (spsSize + ptrPos < magicCookie.length) {
MP4AddH264SequenceParameterSet(_fileHandle, dstTrackId,
avcCAtom+ptrPos, spsSize);
ptrPos += spsSize;
} else {
break;
}
}
int8_t ppsCount = avcCAtom[ptrPos++];
for (i = 0; i < ppsCount; i++) {
uint16_t ppsSize = (avcCAtom[ptrPos++] << 8) & 0xff00;
ppsSize += avcCAtom[ptrPos++] & 0xff;
MP4AddH264PictureParameterSet(_fileHandle, dstTrackId,
avcCAtom + ptrPos, ppsSize);
ptrPos += ppsSize;
if (ppsSize + ptrPos < magicCookie.length) {
MP4AddH264PictureParameterSet(_fileHandle, dstTrackId,
avcCAtom + ptrPos, ppsSize);
ptrPos += ppsSize;
} else {
break;
}
}
MP4SetVideoProfileLevel(_fileHandle, 0x15);