Fix for handling negative h264 offsets in mp4
This commit is contained in:
parent
3b9911df71
commit
4c2eeb96c8
5 changed files with 14 additions and 12 deletions
|
@ -2575,7 +2575,8 @@ namespace MP4 {
|
|||
setEntryCount(no + 1);
|
||||
}
|
||||
setInt32(newCTTSEntry.sampleCount, 8 + no * 8);
|
||||
setInt32(newCTTSEntry.sampleOffset, 8 + (no * 8) + 4);
|
||||
setInt32(*(reinterpret_cast<uint32_t*>(&newCTTSEntry.sampleOffset)), 8 + (no * 8) + 4);
|
||||
|
||||
}
|
||||
|
||||
CTTSEntry CTTS::getCTTSEntry(uint32_t no) {
|
||||
|
@ -2585,7 +2586,8 @@ namespace MP4 {
|
|||
return inval;
|
||||
}
|
||||
retval.sampleCount = getInt32(8 + (no * 8));
|
||||
retval.sampleOffset = getInt32(8 + (no * 8) + 4);
|
||||
uint32_t tmp = getInt32(8 + (no * 8) + 4);
|
||||
retval.sampleOffset = *(reinterpret_cast<int32_t*>(&tmp));
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
@ -538,7 +538,7 @@ namespace MP4 {
|
|||
|
||||
struct CTTSEntry {
|
||||
uint32_t sampleCount;
|
||||
uint32_t sampleOffset;
|
||||
int32_t sampleOffset;
|
||||
};
|
||||
|
||||
class CTTS: public fullBox {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue