Fix multiple MP42SampleBufferFlagEndOfFile being sent on the same track.
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -255,7 +255,7 @@ static NSArray<NSString *> *_supportedFileFormats;
|
||||
MP42SampleBuffer *sample = [[MP42SampleBuffer alloc] init];
|
||||
sample->flags |= MP42SampleBufferFlagEndOfFile;
|
||||
sample->trackId = track.sourceId;
|
||||
[self enqueue:sample];
|
||||
[track enqueue:sample];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -526,6 +526,7 @@
|
||||
NSUInteger tracksCount = _activeTracks.count;
|
||||
NSMutableArray<MP42Track *> *tracks = [_activeTracks copy];
|
||||
NSMutableArray<MP42Track *> *nextTracks = nil;
|
||||
|
||||
for (;;) {
|
||||
@autoreleasepool {
|
||||
|
||||
@@ -545,7 +546,7 @@
|
||||
|
||||
if (sampleBuffer->flags & MP42SampleBufferFlagEndOfFile) {
|
||||
// Tracks done, remove it from the loop
|
||||
NSMutableArray<MP42Track *> *nextTracks = [tracks mutableCopy];
|
||||
nextTracks = nextTracks != nil ? nextTracks : [tracks mutableCopy];
|
||||
[nextTracks removeObject:track];
|
||||
done += 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user