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
+4 -2
+4 -2
View File
@@ -686,7 +686,9 @@
if (type)
helper->edits[helper->editsCount].start.value = -1;
helper->editsCount++;
if (helper->edits[helper->editsCount].duration.value > 0) {
helper->editsCount++;
}
helper->editOpen = NO;
}
@@ -765,7 +767,7 @@
}
// 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);
[self endEditListAtTime:time empty:YES helper:demuxHelper];
[self startEditListAtTime:time helper:demuxHelper];