Skip to content

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

Merged
nanangizz merged 1 commit intomasterfrom
android-video-assert
May 9, 2022
Merged

Prevent assertion when codec encoding height size is larger than wide size#3044
nanangizz merged 1 commit intomasterfrom
android-video-assert

Conversation

@trengginas
Copy link
Copy Markdown
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
BarryYin pushed a commit to BarryYin/pjproject that referenced this pull request Feb 3, 2026
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