Fix a regression in the matroska parser, do not fixup cue start times.
This commit is contained in:
3 files changed
+110
-42
No files matched your search
+10
-6
@@ -149,6 +149,10 @@ MP42_OBJC_DIRECT_MEMBERS
|
|||||||
videoTrack.matrixCoefficients = mkvTrack->AV.Video.Colour.MatrixCoefficients;
|
videoTrack.matrixCoefficients = mkvTrack->AV.Video.Colour.MatrixCoefficients;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mkvTrack->AV.Video.Colour.Range) {
|
||||||
|
videoTrack.colorRange = mkvTrack->AV.Video.Colour.Range;
|
||||||
|
}
|
||||||
|
|
||||||
newTrack = videoTrack;
|
newTrack = videoTrack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,7 +382,7 @@ MP42_OBJC_DIRECT_MEMBERS
|
|||||||
StartTime = 0;
|
StartTime = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (StartTime < (segInfo->Duration / 64)) {
|
while (StartTime < (segInfo->Duration / 64)) {
|
||||||
if (!mkv_ReadFrame(_matroskaFile, 0, &Track, &StartTime, &EndTime, &FilePos, &FrameSize, &frame, &FrameFlags, &FrameDiscard)) {
|
if (!mkv_ReadFrame(_matroskaFile, 0, &Track, &StartTime, &EndTime, &FilePos, &FrameSize, &frame, &FrameFlags, &FrameDiscard, NULL, NULL, NULL)) {
|
||||||
trackSizes[Track] += FrameSize;
|
trackSizes[Track] += FrameSize;
|
||||||
trackTimestamp[Track] = StartTime;
|
trackTimestamp[Track] = StartTime;
|
||||||
i++;
|
i++;
|
||||||
@@ -503,7 +507,7 @@ static NSString * TrackNameToString(TrackInfo *track)
|
|||||||
TrackMask &= ~(1l << Id);
|
TrackMask &= ~(1l << Id);
|
||||||
|
|
||||||
mkv_SetTrackMask(_matroskaFile, TrackMask);
|
mkv_SetTrackMask(_matroskaFile, TrackMask);
|
||||||
mkv_ReadFrame(_matroskaFile, 0, &Track, &StartTime, &EndTime, &FilePos, &FrameSize, &frame, &FrameFlags, &FrameDiscard);
|
mkv_ReadFrame(_matroskaFile, 0, &Track, &StartTime, &EndTime, &FilePos, &FrameSize, &frame, &FrameFlags, &FrameDiscard, NULL, NULL, NULL);
|
||||||
free(frame);
|
free(frame);
|
||||||
mkv_Seek(_matroskaFile, 0, 0);
|
mkv_Seek(_matroskaFile, 0, 0);
|
||||||
|
|
||||||
@@ -564,7 +568,7 @@ static uint32_t timescale(TrackInfo *trackInfo)
|
|||||||
|
|
||||||
if (!strcmp(trackInfo->CodecID, "A_AC3")) {
|
if (!strcmp(trackInfo->CodecID, "A_AC3")) {
|
||||||
// read first header to create track
|
// read first header to create track
|
||||||
int firstFrame = mkv_ReadFrame(_matroskaFile, 0, &rt, &StartTime, &EndTime, &FilePos, &FrameSize, &Frame, &FrameFlags, &FrameDiscard);
|
int firstFrame = mkv_ReadFrame(_matroskaFile, 0, &rt, &StartTime, &EndTime, &FilePos, &FrameSize, &Frame, &FrameFlags, &FrameDiscard, NULL, NULL, NULL);
|
||||||
|
|
||||||
if (firstFrame != 0) {
|
if (firstFrame != 0) {
|
||||||
mkv_Seek(_matroskaFile, 0, 0);
|
mkv_Seek(_matroskaFile, 0, 0);
|
||||||
@@ -619,7 +623,7 @@ static uint32_t timescale(TrackInfo *trackInfo)
|
|||||||
struct eac3_info *context = NULL;
|
struct eac3_info *context = NULL;
|
||||||
SegmentInfo *segInfo = mkv_GetFileInfo(_matroskaFile);
|
SegmentInfo *segInfo = mkv_GetFileInfo(_matroskaFile);
|
||||||
|
|
||||||
while (!mkv_ReadFrame(_matroskaFile, 0, &rt, &StartTime, &EndTime, &FilePos, &FrameSize, &Frame, &FrameFlags, &FrameDiscard)) {
|
while (!mkv_ReadFrame(_matroskaFile, 0, &rt, &StartTime, &EndTime, &FilePos, &FrameSize, &Frame, &FrameFlags, &FrameDiscard, NULL, NULL, NULL)) {
|
||||||
if (StartTime > (segInfo->Duration / 64)) {
|
if (StartTime > (segInfo->Duration / 64)) {
|
||||||
free(Frame);
|
free(Frame);
|
||||||
break;
|
break;
|
||||||
@@ -678,7 +682,7 @@ static uint32_t timescale(TrackInfo *trackInfo)
|
|||||||
int64_t FrameDiscard;
|
int64_t FrameDiscard;
|
||||||
char *Frame = NULL;
|
char *Frame = NULL;
|
||||||
|
|
||||||
while (!mkv_ReadFrame(_matroskaFile, 0, &rt, &StartTime, &EndTime, &FilePos, &FrameSize, &Frame, &FrameFlags, &FrameDiscard)) {
|
while (!mkv_ReadFrame(_matroskaFile, 0, &rt, &StartTime, &EndTime, &FilePos, &FrameSize, &Frame, &FrameFlags, &FrameDiscard, NULL, NULL, NULL)) {
|
||||||
if (mkvpktnum++ > 5) {
|
if (mkvpktnum++ > 5) {
|
||||||
free(Frame);
|
free(Frame);
|
||||||
break;
|
break;
|
||||||
@@ -803,7 +807,7 @@ static uint32_t timescale(TrackInfo *trackInfo)
|
|||||||
MP42SampleBuffer *frameSample = nil, *currentSample = nil;
|
MP42SampleBuffer *frameSample = nil, *currentSample = nil;
|
||||||
int64_t duration, next_duration;
|
int64_t duration, next_duration;
|
||||||
|
|
||||||
while (!mkv_ReadFrame(_matroskaFile, 0, &Track, &StartTime, &EndTime, &FilePos, &FrameSize, &Frame, &FrameFlags, &FrameDiscard)) {
|
while (!mkv_ReadFrame(_matroskaFile, 0, &Track, &StartTime, &EndTime, &FilePos, &FrameSize, &Frame, &FrameFlags, &FrameDiscard, NULL, NULL, NULL)) {
|
||||||
|
|
||||||
if (self.cancelled) {
|
if (self.cancelled) {
|
||||||
free(Frame);
|
free(Frame);
|
||||||
|
|||||||
+87
-35
@@ -121,13 +121,17 @@ struct QueueEntry {
|
|||||||
unsigned int Length;
|
unsigned int Length;
|
||||||
char *Data;
|
char *Data;
|
||||||
|
|
||||||
ulonglong Start;
|
longlong Start;
|
||||||
ulonglong End;
|
ulonglong End;
|
||||||
ulonglong Position;
|
ulonglong Position;
|
||||||
|
|
||||||
longlong DiscardPadding;
|
longlong DiscardPadding;
|
||||||
|
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
|
||||||
|
unsigned int AdditionalID;
|
||||||
|
unsigned int DataAdditionalLength;
|
||||||
|
char *DataAdditional;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Queue {
|
struct Queue {
|
||||||
@@ -521,9 +525,11 @@ static struct QueueEntry *QAlloc(MatroskaFile *mf) {
|
|||||||
for (i=0;i<QSEGSIZE-1;++i) {
|
for (i=0;i<QSEGSIZE-1;++i) {
|
||||||
qe[i].next = qe+i+1;
|
qe[i].next = qe+i+1;
|
||||||
qe[i].Data = NULL;
|
qe[i].Data = NULL;
|
||||||
|
qe[i].DataAdditional = NULL;
|
||||||
}
|
}
|
||||||
qe[QSEGSIZE-1].next = NULL;
|
qe[QSEGSIZE-1].next = NULL;
|
||||||
qe[QSEGSIZE-1].Data = NULL;
|
qe[QSEGSIZE-1].Data = NULL;
|
||||||
|
qe[QSEGSIZE-1].DataAdditional = NULL;
|
||||||
|
|
||||||
mf->QFreeList = qe;
|
mf->QFreeList = qe;
|
||||||
}
|
}
|
||||||
@@ -537,6 +543,8 @@ static struct QueueEntry *QAlloc(MatroskaFile *mf) {
|
|||||||
static inline void QFree(MatroskaFile *mf,struct QueueEntry *qe) {
|
static inline void QFree(MatroskaFile *mf,struct QueueEntry *qe) {
|
||||||
mf->cache->memfree(mf->cache, qe->Data);
|
mf->cache->memfree(mf->cache, qe->Data);
|
||||||
qe->Data = NULL;
|
qe->Data = NULL;
|
||||||
|
mf->cache->memfree(mf->cache, qe->DataAdditional);
|
||||||
|
qe->DataAdditional = NULL;
|
||||||
qe->next = mf->QFreeList;
|
qe->next = mf->QFreeList;
|
||||||
mf->QFreeList = qe;
|
mf->QFreeList = qe;
|
||||||
}
|
}
|
||||||
@@ -1152,7 +1160,9 @@ static void parseFirstCluster(MatroskaFile *mf,ulonglong toplen) {
|
|||||||
tc = readUInt(mf,(unsigned)len);
|
tc = readUInt(mf,(unsigned)len);
|
||||||
if (!seenTimecode) {
|
if (!seenTimecode) {
|
||||||
seenTimecode = 1;
|
seenTimecode = 1;
|
||||||
mf->firstTimecode += tc;
|
// Commented out, MP42Foundation wants the real timecode,
|
||||||
|
// not timecode starting at 0.
|
||||||
|
//mf->firstTimecode += tc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seenBlock) {
|
if (seenBlock) {
|
||||||
@@ -1169,7 +1179,9 @@ out:
|
|||||||
tc = readSInt(mf, 2);
|
tc = readSInt(mf, 2);
|
||||||
if (!seenBlock) {
|
if (!seenBlock) {
|
||||||
seenBlock = 1;
|
seenBlock = 1;
|
||||||
mf->firstTimecode += tc;
|
// Commented out, MP42Foundation wants the real timecode,
|
||||||
|
// not timecode starting at 0.
|
||||||
|
//mf->firstTimecode += tc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seenTimecode)
|
if (seenTimecode)
|
||||||
@@ -1182,7 +1194,9 @@ out:
|
|||||||
tc = readSInt(mf,2);
|
tc = readSInt(mf,2);
|
||||||
if (!seenBlock) {
|
if (!seenBlock) {
|
||||||
seenBlock = 1;
|
seenBlock = 1;
|
||||||
mf->firstTimecode += tc;
|
// Commented out, MP42Foundation wants the real timecode,
|
||||||
|
// not timecode starting at 0.
|
||||||
|
//mf->firstTimecode += tc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seenTimecode)
|
if (seenTimecode)
|
||||||
@@ -1272,6 +1286,30 @@ static void parseVideoColourInfo(MatroskaFile *mf,ulonglong toplen,struct TrackI
|
|||||||
ENDFOR(mf);
|
ENDFOR(mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void parseProjection(MatroskaFile *mf,ulonglong toplen,struct TrackInfo *ti) {
|
||||||
|
FOREACH(mf,toplen)
|
||||||
|
case 0x7671: // Projection Type
|
||||||
|
ti->AV.Video.Projection.ProjectionType = readUInt(mf, (unsigned)len);
|
||||||
|
break;
|
||||||
|
case 0x7672: // Projection Private
|
||||||
|
if (len<=20) // 20-bytes
|
||||||
|
{
|
||||||
|
readbytes(mf,ti->AV.Video.Projection.ProjectionPrivate,(int)len);
|
||||||
|
ti->AV.Video.Projection.ProjectionPrivateSize = len;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x7673: // ProjectionPoseYaw
|
||||||
|
ti->AV.Video.Projection.ProjectionPoseYaw = readFloat(mf,(unsigned)len);
|
||||||
|
break;
|
||||||
|
case 0x7674: // ProjectionPosePitch
|
||||||
|
ti->AV.Video.Projection.ProjectionPosePitch = readFloat(mf,(unsigned)len);
|
||||||
|
break;
|
||||||
|
case 0x7675: // ProjectionPoseRoll
|
||||||
|
ti->AV.Video.Projection.ProjectionPoseRoll = readFloat(mf,(unsigned)len);
|
||||||
|
break;
|
||||||
|
ENDFOR(mf);
|
||||||
|
}
|
||||||
|
|
||||||
static void parseVideoInfo(MatroskaFile *mf,ulonglong toplen,struct TrackInfo *ti) {
|
static void parseVideoInfo(MatroskaFile *mf,ulonglong toplen,struct TrackInfo *ti) {
|
||||||
ulonglong v;
|
ulonglong v;
|
||||||
char dW = 0, dH = 0;
|
char dW = 0, dH = 0;
|
||||||
@@ -1357,6 +1395,9 @@ static void parseVideoInfo(MatroskaFile *mf,ulonglong toplen,struct TrackInfo *t
|
|||||||
case 0x55b0: // Colour
|
case 0x55b0: // Colour
|
||||||
parseVideoColourInfo(mf,len,ti);
|
parseVideoColourInfo(mf,len,ti);
|
||||||
break;
|
break;
|
||||||
|
case 0x7670: // Projection
|
||||||
|
parseProjection(mf,len,ti);
|
||||||
|
break;
|
||||||
ENDFOR(mf);
|
ENDFOR(mf);
|
||||||
|
|
||||||
// DisplayWidth/Height defaults don't apply for DisplayUnit != 0
|
// DisplayWidth/Height defaults don't apply for DisplayUnit != 0
|
||||||
@@ -1424,9 +1465,9 @@ static void parseTrackEntry(MatroskaFile *mf,ulonglong toplen) {
|
|||||||
size_t cplen = 0, cslen = 0, cpadd = 0;
|
size_t cplen = 0, cslen = 0, cpadd = 0;
|
||||||
unsigned CompScope, num_comp = 0;
|
unsigned CompScope, num_comp = 0;
|
||||||
|
|
||||||
if (mf->nTracks >= MAX_TRACKS)
|
if (mf->nTracks >= MAX_TRACKS) {
|
||||||
{
|
|
||||||
//errorjmp(mf,"Too many tracks.");
|
//errorjmp(mf,"Too many tracks.");
|
||||||
|
skipbytes(mf, toplen);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2312,9 +2353,8 @@ static void parseSegment(MatroskaFile *mf,ulonglong toplen) {
|
|||||||
parsePointers(mf);
|
parsePointers(mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
static void parseBlockAdditions(MatroskaFile *mf, ulonglong toplen, struct QueueEntry *qe) {
|
||||||
static void parseBlockAdditions(MatroskaFile *mf, ulonglong toplen, ulonglong timecode, unsigned track) {
|
ulonglong add_id = 1, add_len;
|
||||||
ulonglong add_id = 1, add_pos, add_len;
|
|
||||||
unsigned char have_add;
|
unsigned char have_add;
|
||||||
void *add_data;
|
void *add_data;
|
||||||
|
|
||||||
@@ -2327,33 +2367,27 @@ static void parseBlockAdditions(MatroskaFile *mf, ulonglong toplen, ulonglong ti
|
|||||||
add_id = readUInt(mf, (unsigned)len);
|
add_id = readUInt(mf, (unsigned)len);
|
||||||
break;
|
break;
|
||||||
case 0xa5: // BlockAddition
|
case 0xa5: // BlockAddition
|
||||||
add_pos = filepos(mf);
|
if (add_data == NULL) {
|
||||||
add_len = len;
|
add_len = len;
|
||||||
add_data = mf->cache->memrealloc(mf->cache,add_data,add_len);
|
add_data = mf->cache->memrealloc(mf->cache,add_data,add_len);
|
||||||
readbytes(mf, add_data, len);
|
readbytes(mf, add_data, len);
|
||||||
|
} else
|
||||||
|
skipbytes(mf,len);
|
||||||
++have_add;
|
++have_add;
|
||||||
break;
|
break;
|
||||||
ENDFOR(mf);
|
ENDFOR(mf);
|
||||||
if (have_add == 1 && id > 0 && id < 255) {
|
if (have_add == 1 && qe->DataAdditional == NULL) {
|
||||||
struct QueueEntry *qe = QAlloc(mf);
|
qe->AdditionalID = add_id;
|
||||||
qe->Start = qe->End = timecode;
|
qe->DataAdditional = add_data;
|
||||||
qe->Position = add_pos;
|
qe->DataAdditionalLength = add_len;
|
||||||
qe->Length = (unsigned)add_len;
|
|
||||||
qe->Data = (char *)add_data;
|
|
||||||
qe->flags = FRAME_UNKNOWN_START | FRAME_UNKNOWN_END |
|
|
||||||
(((unsigned)add_id << FRAME_STREAM_SHIFT) & FRAME_STREAM_MASK);
|
|
||||||
qe->DiscardPadding = 0;
|
|
||||||
|
|
||||||
QPut(&mf->Queues[track],qe);
|
|
||||||
} else if(add_data) {
|
} else if(add_data) {
|
||||||
mf->cache->memfree(mf->cache,add_data);
|
mf->cache->memfree(mf->cache,add_data);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
ENDFOR(mf);
|
ENDFOR(mf);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void parseBlockGroup(MatroskaFile *mf,ulonglong toplen,ulonglong timecode, int blockex) {
|
static void parseBlockGroup(MatroskaFile *mf,ulonglong toplen,longlong timecode, int blockex) {
|
||||||
ulonglong v;
|
ulonglong v;
|
||||||
ulonglong duration = 0;
|
ulonglong duration = 0;
|
||||||
ulonglong dpos;
|
ulonglong dpos;
|
||||||
@@ -2407,7 +2441,7 @@ found:
|
|||||||
|
|
||||||
// recalculate this block's timecode to final timecode in ns
|
// recalculate this block's timecode to final timecode in ns
|
||||||
timecode = mul3(mf->Tracks[tracknum]->TimecodeScale,
|
timecode = mul3(mf->Tracks[tracknum]->TimecodeScale,
|
||||||
(timecode - mf->firstTimecode + block_timecode) * mf->Seg.TimecodeScale);
|
(timecode /*- mf->firstTimecode*/ + block_timecode) * mf->Seg.TimecodeScale);
|
||||||
|
|
||||||
c = readch(mf);
|
c = readch(mf);
|
||||||
if (c==EOF)
|
if (c==EOF)
|
||||||
@@ -2502,9 +2536,9 @@ found:
|
|||||||
have_duration = 1;
|
have_duration = 1;
|
||||||
break;
|
break;
|
||||||
case 0x75a1: // BlockAdditions
|
case 0x75a1: // BlockAdditions
|
||||||
/*if (nframes > 0) // have some frames
|
if (nframes == 1) // have some frames (limited to cases with no lacing)
|
||||||
parseBlockAdditions(mf, len, timecode, tracknum);
|
parseBlockAdditions(mf, len, qf);
|
||||||
else*/
|
else
|
||||||
skipbytes(mf, len);
|
skipbytes(mf, len);
|
||||||
break;
|
break;
|
||||||
case 0x75a2: // DiscardPadding
|
case 0x75a2: // DiscardPadding
|
||||||
@@ -2574,6 +2608,8 @@ static void ClearQueue(MatroskaFile *mf,struct Queue *q) {
|
|||||||
qn = qe->next;
|
qn = qe->next;
|
||||||
mf->cache->memfree(mf->cache, qe->Data);
|
mf->cache->memfree(mf->cache, qe->Data);
|
||||||
qe->Data = NULL;
|
qe->Data = NULL;
|
||||||
|
mf->cache->memfree(mf->cache, qe->DataAdditional);
|
||||||
|
qe->DataAdditional = NULL;
|
||||||
qe->next = mf->QFreeList;
|
qe->next = mf->QFreeList;
|
||||||
mf->QFreeList = qe;
|
mf->QFreeList = qe;
|
||||||
}
|
}
|
||||||
@@ -2881,7 +2917,7 @@ static void fixupChapter(ulonglong adj, struct Chapter *ch) {
|
|||||||
|
|
||||||
static longlong findLastTimecode(MatroskaFile *mf) {
|
static longlong findLastTimecode(MatroskaFile *mf) {
|
||||||
ulonglong nd = 0;
|
ulonglong nd = 0;
|
||||||
unsigned n,vtrack,retry=0;
|
unsigned n,vtrack,vtrackid,retry=0,cueoffset=0;
|
||||||
|
|
||||||
if (mf->nTracks == 0)
|
if (mf->nTracks == 0)
|
||||||
return -1;
|
return -1;
|
||||||
@@ -2889,6 +2925,7 @@ static longlong findLastTimecode(MatroskaFile *mf) {
|
|||||||
for (n=vtrack=0;n<mf->nTracks;++n)
|
for (n=vtrack=0;n<mf->nTracks;++n)
|
||||||
if (mf->Tracks[n]->Type == TT_VIDEO) {
|
if (mf->Tracks[n]->Type == TT_VIDEO) {
|
||||||
vtrack = n;
|
vtrack = n;
|
||||||
|
vtrackid = mf->Tracks[n]->Number;
|
||||||
goto ok;
|
goto ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2907,11 +2944,17 @@ ok:
|
|||||||
if (retry > 0 && (mf->pCluster + (MAXDURATIONREAD << retry) > mf->pSegmentTop) && (mf->pCluster + (MAXDURATIONREAD << (retry - 1)) > mf->pSegmentTop))
|
if (retry > 0 && (mf->pCluster + (MAXDURATIONREAD << retry) > mf->pSegmentTop) && (mf->pCluster + (MAXDURATIONREAD << (retry - 1)) > mf->pSegmentTop))
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if (retry >= mf->nCues)
|
if ((retry + cueoffset) >= mf->nCues)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
mf->readPosition = mf->Cues[mf->nCues - (1 + retry)].Position + mf->pSegment;
|
struct Cue *pCue = &mf->Cues[mf->nCues - (1 + retry + cueoffset)];
|
||||||
mf->tcCluster = mf->Cues[mf->nCues - (1 + retry)].Time / mf->Seg.TimecodeScale;
|
while ((retry + cueoffset) < (mf->nCues - 1) && pCue->Track != vtrackid) {
|
||||||
|
cueoffset++;
|
||||||
|
pCue = &mf->Cues[mf->nCues - (1 + retry + cueoffset)];
|
||||||
|
}
|
||||||
|
|
||||||
|
mf->readPosition = pCue->Position + mf->pSegment;
|
||||||
|
mf->tcCluster = pCue->Time / mf->Seg.TimecodeScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -3729,7 +3772,8 @@ int mkv_ReadFrame(MatroskaFile *mf,
|
|||||||
ulonglong mask,unsigned int *track,
|
ulonglong mask,unsigned int *track,
|
||||||
ulonglong *StartTime,ulonglong *EndTime,
|
ulonglong *StartTime,ulonglong *EndTime,
|
||||||
ulonglong *FilePos,unsigned int *FrameSize,
|
ulonglong *FilePos,unsigned int *FrameSize,
|
||||||
char **FrameData,unsigned int *FrameFlags, longlong *FrameDiscard)
|
char **FrameData,unsigned int *FrameFlags, longlong *FrameDiscard,
|
||||||
|
unsigned int *FrameAdditionalSize, char **FrameAdditionalData, unsigned int *FrameAdditionalID)
|
||||||
{
|
{
|
||||||
unsigned int i,j;
|
unsigned int i,j;
|
||||||
struct QueueEntry *qe;
|
struct QueueEntry *qe;
|
||||||
@@ -3763,6 +3807,14 @@ int mkv_ReadFrame(MatroskaFile *mf,
|
|||||||
*FrameFlags = qe->flags;
|
*FrameFlags = qe->flags;
|
||||||
*FrameDiscard = qe->DiscardPadding;
|
*FrameDiscard = qe->DiscardPadding;
|
||||||
|
|
||||||
|
if (FrameAdditionalSize && FrameAdditionalData && FrameAdditionalID) {
|
||||||
|
*FrameAdditionalSize = qe->DataAdditionalLength;
|
||||||
|
*FrameAdditionalData = qe->DataAdditional;
|
||||||
|
*FrameAdditionalID = qe->AdditionalID;
|
||||||
|
|
||||||
|
qe->DataAdditional = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
qe->Data = NULL;
|
qe->Data = NULL;
|
||||||
QFree(mf,qe);
|
QFree(mf,qe);
|
||||||
|
|
||||||
|
|||||||
@@ -178,6 +178,15 @@ struct TrackInfo {
|
|||||||
} MasteringMetadata;
|
} MasteringMetadata;
|
||||||
} Colour;
|
} Colour;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
unsigned int ProjectionType;
|
||||||
|
char ProjectionPrivate[20];
|
||||||
|
unsigned ProjectionPrivateSize;
|
||||||
|
MKFLOAT ProjectionPoseYaw;
|
||||||
|
MKFLOAT ProjectionPosePitch;
|
||||||
|
MKFLOAT ProjectionPoseRoll;
|
||||||
|
} Projection;
|
||||||
|
|
||||||
unsigned int Interlaced:1;
|
unsigned int Interlaced:1;
|
||||||
} Video;
|
} Video;
|
||||||
struct {
|
struct {
|
||||||
@@ -413,7 +422,10 @@ X int mkv_ReadFrame(/* in */ MatroskaFile *mf,
|
|||||||
/* out */ unsigned int *FrameSize /* in bytes */,
|
/* out */ unsigned int *FrameSize /* in bytes */,
|
||||||
/* out */ char **FrameData,
|
/* out */ char **FrameData,
|
||||||
/* out */ unsigned int *FrameFlags,
|
/* out */ unsigned int *FrameFlags,
|
||||||
/* out */ longlong *FrameDiscard);
|
/* out */ longlong *FrameDiscard,
|
||||||
|
/* out */ unsigned int *FrameAdditionalSize, /* in bytes */
|
||||||
|
/* out */ char **FrameAdditionalData,
|
||||||
|
/* out */ unsigned int *FrameAdditionalID);
|
||||||
|
|
||||||
#ifdef MATROSKA_COMPRESSION_SUPPORT
|
#ifdef MATROSKA_COMPRESSION_SUPPORT
|
||||||
/* Compressed streams support */
|
/* Compressed streams support */
|
||||||
|
|||||||
Reference in new issue
Block a user