Repository navigation
Reduce Android video copies and fix OBS converter double-free - #69
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Android video path now validates and normalizes length-prefixed NAL units in place. The OBS frame converter updates cached scaler ownership. New tests cover normalization, mux output, and frame conversion across pixel formats and dimensions. ChangesAndroid video normalization
OBS frame conversion
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue is established that would prevent merging after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The changes preserve existing media interfaces and session checks, and no new security weakness was established. Remaining uncertainty concerns third-party resource ownership when conversion-context allocation fails. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
Merge assessment for 0337687:
Live stream latency and battery gains remain unmeasured; this PR makes no quantitative performance claim. |
Android video normalization currently copies encoded frames into another buffer before converting length prefixes. Reuse the JNI buffer, validate complete length-prefixed input before modifying it, and reserve codec-header space once for keyframes. Packet content and malformed-input fallback remain unchanged.
Fix OBS converter ownership when FFmpeg replaces a cached scaling context. The new resolution/pixel-format regression test reproduces a double-free on the previous implementation under AddressSanitizer and passes with this fix.
Validation on a clean branch based on current main:
Live phone-to-OBS latency and battery improvements have not been measured. Hardware decoding is outside this change.
Summary by CodeRabbit