diff --git a/Library/Sources/SCPlayer.m b/Library/Sources/SCPlayer.m index 7a27e2e5..e41461be 100644 --- a/Library/Sources/SCPlayer.m +++ b/Library/Sources/SCPlayer.m @@ -39,7 +39,7 @@ - (id)init { self = [super init]; if (self) { - _shouldSuppressPlayerRendering = YES; + _shouldSuppressPlayerRendering = NO; [self addObserver:self forKeyPath:@"currentItem" options:NSKeyValueObservingOptionNew context:ItemChanged]; } @@ -321,6 +321,8 @@ - (void)setItemByAsset:(AVAsset *)asset { } - (void)setItem:(AVPlayerItem *)item { + [self unsetupDisplayLink]; + [self setupDisplayLink]; [self replaceCurrentItemWithPlayerItem:item]; } diff --git a/Library/Sources/SCRecordSession.m b/Library/Sources/SCRecordSession.m index 9cc91131..cdab9f6e 100644 --- a/Library/Sources/SCRecordSession.m +++ b/Library/Sources/SCRecordSession.m @@ -439,8 +439,7 @@ - (CMSampleBufferRef)adjustBuffer:(CMSampleBufferRef)sample withTimeOffset:(CMTi pInfo[i].duration = duration; } - CMSampleBufferRef sout; - CMSampleBufferCreateCopyWithNewTiming(nil, sample, count, pInfo, &sout); + CMSampleBufferRef sout = sample; free(pInfo); return sout; }