Address grill feedback: BT.709 tagging, per-job cancel, frameRateCap clamp
B1: Android encoder format now sets KEY_COLOR_STANDARD = BT709, KEY_COLOR_TRANSFER = SDR_VIDEO, KEY_COLOR_RANGE = LIMITED (API 24+). Previously the encoder inherited or emitted default color metadata, which meant HDR sources produced incorrectly-tagged output on Android. iOS already had AVVideoColorPropertiesKey set correctly. B2: Replace single currentCompressor reference with a per-job map keyed by jobId. The cancel function now takes a jobId and only cancels that specific job. Prevents the previous race where a second compress call overwrote the reference and made the first job uncancellable. B3: Clamp frameRateCap to >= 1 at the native module boundary. Previously a value of 0 from JS would cause divide-by-zero (Android Long division ArithmeticException, iOS CMTime Infinity / Int32(0) frameDuration trap).
This commit is contained in:
@@ -63,7 +63,7 @@ export function compress(
|
||||
}
|
||||
|
||||
const abortHandler = () => {
|
||||
NativeModule.cancel()
|
||||
NativeModule.cancel(jobId)
|
||||
subscription?.remove()
|
||||
reject(new AbortError())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user