Fixed an issue with a negative initial presetantion output timestamp.

This commit is contained in:
Damiano Galassi committed 2014-03-27 11:13:53 +01:00
1 parent d1fbdb19d5
commit a0a8c3b56f
1 file changed
+3 -1
+3 -1
View File
@@ -686,7 +686,9 @@
if (type) if (type)
helper->edits[helper->editsCount].start.value = -1; helper->edits[helper->editsCount].start.value = -1;
if (helper->edits[helper->editsCount].duration.value > 0) {
helper->editsCount++; helper->editsCount++;
}
helper->editOpen = NO; helper->editOpen = NO;
} }
@@ -765,7 +767,7 @@
} }
// Check for the initial empty edit // Check for the initial empty edit
if (demuxHelper->currentTime == 0 && presentationOutputTimeStamp.value != 0) { if (demuxHelper->currentTime == 0 && presentationOutputTimeStamp.value > 0) {
CMTime time = CMTimeConvertScale(presentationOutputTimeStamp, duration.timescale, kCMTimeRoundingMethod_Default); CMTime time = CMTimeConvertScale(presentationOutputTimeStamp, duration.timescale, kCMTimeRoundingMethod_Default);
[self endEditListAtTime:time empty:YES helper:demuxHelper]; [self endEditListAtTime:time empty:YES helper:demuxHelper];
[self startEditListAtTime:time helper:demuxHelper]; [self startEditListAtTime:time helper:demuxHelper];