Bug 1795101 - replace deprecated CMTimebaseCreateWithMasterClock by CMTimebaseCreateWithSourceClock r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D159341
This commit is contained in:
Robert Longson 2022-10-14 06:46:44 +00:00
parent f4ad93680f
commit dbf0e20942

View File

@ -1586,7 +1586,11 @@ bool NativeLayerCA::Representation::ApplyChanges(
if (aSpecializeVideo) {
mContentCALayer = [[AVSampleBufferDisplayLayer layer] retain];
CMTimebaseRef timebase;
#ifdef CMTIMEBASE_USE_SOURCE_TERMINOLOGY
CMTimebaseCreateWithSourceClock(kCFAllocatorDefault, CMClockGetHostTimeClock(), &timebase);
#else
CMTimebaseCreateWithMasterClock(kCFAllocatorDefault, CMClockGetHostTimeClock(), &timebase);
#endif
CMTimebaseSetRate(timebase, 1.0f);
[(AVSampleBufferDisplayLayer*)mContentCALayer setControlTimebase:timebase];
CFRelease(timebase);