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

fix isValid() for VAAPI frame #141

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

lukasz-misek
Copy link

fix frame isValid() method for frames returned from VAAPI decoder.
In this case m_raw->data[0] and m_raw->linesize[0] are both null and m_raw[3] contains vaapi surface id (valid when > 0).

bool isValid() const {
return (!isNull() &&
((m_raw->data[0] && m_raw->linesize[0]) ||
((m_raw->format == AV_PIX_FMT_VAAPI) && ((intptr_t)m_raw->data[3] > 0)))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data[3] contains VASurfaceID, am I right?

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.

2 participants