Move the offset calculation to MP42EditListsReconstructor
This commit is contained in:
3 files changed
+15
-10
No files matched your search
@@ -34,6 +34,8 @@
|
||||
_priorityQueue = [[MP42Heap alloc] initWithCapacity:32 comparator:^NSComparisonResult(MP42SampleBuffer * obj1, MP42SampleBuffer * obj2) {
|
||||
return obj2->presentationTimestamp - obj1->presentationTimestamp;
|
||||
}];
|
||||
|
||||
_minOffset = INT64_MAX;
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -105,6 +107,10 @@
|
||||
// Re-align things if the first sample pts is not 0
|
||||
_currentMediaTime = sample->presentationTimestamp;
|
||||
}
|
||||
|
||||
if (sample->offset < _minOffset) {
|
||||
_minOffset = sample->offset;
|
||||
}
|
||||
|
||||
#ifdef AVF_DEBUG
|
||||
NSLog(@"T: %llu, D: %lld, P: %lld, PO: %lld O: %lld", _currentMediaTime, sample->decodeTimestamp, sample->presentationTimestamp, sample->presentationOutputTimestamp, sample->offset);
|
||||
|
||||
Reference in new issue
Block a user