Skip to content

Fix Camera2 unsupported JPEG configuration crash - #12

Open
HerilChahwala-ANVTech wants to merge 2 commits into
Cross2pro:masterfrom
Heril555:fix/camera2-jpeg-crash
Open

Fix Camera2 unsupported JPEG configuration crash#12
HerilChahwala-ANVTech wants to merge 2 commits into
Cross2pro:masterfrom
Heril555:fix/camera2-jpeg-crash

Conversation

@HerilChahwala-ANVTech

Copy link
Copy Markdown

This PR fixes the UnsupportedOperationException that causes the app to hang or crash on certain devices. It adds logic to check if the target surface belongs to an ImageReader configured with format 256 (JPEG). If it does, the hook no longer replaces the ImageReader surface with VCAM's c2_virtual_surface, allowing the real camera hardware to capture a valid frame. It also prevents the instantiation of VideoToFrames for JPEG targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant