Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent assertion when codec encoding height size is larger than wide size #3044

Merged
merged 1 commit into from
May 9, 2022

Conversation

trengginas
Copy link
Member

PR #2797 will replace Android Camera framework with Camera2.
After the changes, when codec encoding param height size is larger than width size (e.g: 480x720) assertion will be raised:

pj_assert(p1 >= p0_end || p2 >= p0_end);

This is caused the width and height might get switched when creating the stream.

    /* Instantiate PjCamera */
    strm->cam_size.w = (vfd->size.w > vfd->size.h? vfd->size.w: vfd->size.h);
    strm->cam_size.h = (vfd->size.w > vfd->size.h? vfd->size.h: vfd->size.w);

@nanangizz nanangizz merged commit c3d260d into master May 9, 2022
@nanangizz nanangizz deleted the android-video-assert branch May 9, 2022 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants