fix: replay the last presented scope frame at the clip out point

这个提交包含在:
mac 于 2026-11-08 16:57:15 +08:00 提交
1 父节点 c791ddcb76
当前提交 98d80970e8
10 个文件已更改
+37 -35

没有与搜索条件相匹配的文件

+10 -4
查看文件
@@ -10,12 +10,18 @@ static inline CMTime DYScopeDisplayTime(CMTime requested,CMTime start,CMTime dur
// Custom-view time can land between rendered input frames. A cached frame
// covers its own interval only; the next frame boundary must get a fresh sample.
static inline bool DYScopeFrameContainsTime(CMTime captured,CMTime requested,CMTime frame){
static inline bool DYScopeFrameContainsTime(CMTime captured,CMTime requested,CMTime frame,bool exclusiveEnd){
if(!CMTIME_IS_NUMERIC(captured)||!CMTIME_IS_NUMERIC(requested)||captured.epoch!=requested.epoch)return false;
int comparison=CMTimeCompare(captured,requested);
if(comparison==0)return true;
return comparison<0&&CMTIME_IS_NUMERIC(frame)&&frame.value>0&&!frame.epoch&&
CMTimeCompare(CMTimeSubtract(requested,captured),frame)<0;
if(comparison==0)return !exclusiveEnd;
if(comparison>0||!CMTIME_IS_NUMERIC(frame)||frame.value<=0||frame.epoch)return false;
CMTime delta=CMTimeSubtract(requested,captured);
if(exclusiveEnd){
// FCP holds its last presented project frame at the exclusive clip end.
// Allow a final project frame as slow as 23.976 even for faster source media.
return CMTimeCompare(delta,CMTimeMaximum(frame,CMTimeMake(1001,24000)))<=0;
}
return CMTimeCompare(delta,frame)<0;
}
#import <FxPlug/FxPlugSDK.h>