You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: critical zero-copy and format conversion bugs (#52)
* fix: critical zero-copy and format conversion bugs
Fixes 11 critical and medium-priority bugs across backends:
CRITICAL (HIGH):
- Fix double CVPixelBufferUnlockBaseAddress in Apple camera
- Fix double CVPixelBufferUnlockBaseAddress in Apple file reader
- Fix use-after-free in Windows file reader
DANGLING POINTER (MEDIUM):
- Fix dangling nativeHandle in Apple camera after conversion
- Fix dangling nativeHandle in Apple file reader after conversion
- Fix dangling nativeHandle in DirectShow backend
FORMAT CONVERSION (MEDIUM):
- Guard shouldConvert against Unknown output format in DShow/MSMF
- Log warnings for unsupported YUV-to-different-YUV conversion
- Log warnings for unsupported RGB-to-YUV conversion
DOCUMENTATION (LOW):
- Fix kPixelFormatBGRBit comment typo
- Remove misleading @refitem from I420 docs
- Clarify zero-copy requirements in PixelFormatOutput
- Document Apple YUV subtype behavior
All 907 functional tests pass with ASAN enabled. No regressions.
* fix: handle Unknown output format and reduce per-frame log noise
- Derive effectiveOutputFormat to avoid passing PixelFormat::Unknown to
inplaceConvertFrame across all providers (DirectShow, MSMF, V4L2,
AVFoundation) and file readers (Windows MF, Apple AVAssetReader).
When outputPixelFormat is Unknown, treat it as 'keep input format'
so isOutputYUV, shouldConvert, shouldFlip, and the conversion call
all use the camera/input format instead.
- Use log-once pattern for unsupported YUV-to-YUV (without libyuv) and
RGB-to-YUV conversion warnings to prevent flooding stderr in
long-running captures.
- Update PixelFormatOutput documentation to clarify Unknown semantics
and unsupported conversion limitations.
* docs: clarify log suppression behavior in inplaceConvertFrame
0 commit comments