mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-01 04:08:07 +00:00
Fix !soft
This commit is contained in:
parent
0ae2ee619a
commit
cc1df66165
@ -195,11 +195,9 @@ public final class MediaPlayerNode: ASDisplayNode {
|
|||||||
state.maxTakenTime = frameTime
|
state.maxTakenTime = frameTime
|
||||||
let attachments = CMSampleBufferGetSampleAttachmentsArray(frame.sampleBuffer, createIfNecessary: true)! as NSArray
|
let attachments = CMSampleBufferGetSampleAttachmentsArray(frame.sampleBuffer, createIfNecessary: true)! as NSArray
|
||||||
let dict = attachments[0] as! NSMutableDictionary
|
let dict = attachments[0] as! NSMutableDictionary
|
||||||
if i == 0 {
|
if i == 0 && !soft {
|
||||||
CMSetAttachment(frame.sampleBuffer, key: kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding as NSString, value: kCFBooleanTrue as AnyObject, attachmentMode: kCMAttachmentMode_ShouldPropagate)
|
CMSetAttachment(frame.sampleBuffer, key: kCMSampleBufferAttachmentKey_ResetDecoderBeforeDecoding as NSString, value: kCFBooleanTrue as AnyObject, attachmentMode: kCMAttachmentMode_ShouldPropagate)
|
||||||
if !soft {
|
CMSetAttachment(frame.sampleBuffer, key: kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration as NSString, value: kCFBooleanTrue as AnyObject, attachmentMode: kCMAttachmentMode_ShouldPropagate)
|
||||||
CMSetAttachment(frame.sampleBuffer, key: kCMSampleBufferAttachmentKey_EndsPreviousSampleDuration as NSString, value: kCFBooleanTrue as AnyObject, attachmentMode: kCMAttachmentMode_ShouldPropagate)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if !soft {
|
if !soft {
|
||||||
if CMTimeCompare(frame.position, atTime) < 0 {
|
if CMTimeCompare(frame.position, atTime) < 0 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user