refactor: remove duplicate video format creation

This commit is contained in:
Acaki
2025-08-21 05:11:12 +08:00
parent 958b391afa
commit 3ba0e35032
-8
View File
@@ -882,14 +882,6 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit);
}
}
if (self->_formatDescImageBuffer == NULL || !CMVideoFormatDescriptionMatchesImageBuffer(self->_formatDescImageBuffer, imageBuffer)) {
OSStatus res = CMVideoFormatDescriptionCreateForImageBuffer(kCFAllocatorDefault, imageBuffer, &(self->_formatDescImageBuffer));
if (res != noErr) {
Log(LOG_E, @"Failed to create video format description from imageBuffer");
return;
}
}
CMSampleTimingInfo sampleTiming = {kCMTimeInvalid, presentationTimestamp, presentationDuration};
OSStatus err =