diff --git a/src/frame.h b/src/frame.h index 4102d7c..4e1386a 100644 --- a/src/frame.h +++ b/src/frame.h @@ -264,7 +264,12 @@ class Frame : public FFWrapperPtr bool isComplete() const { return m_isComplete; } - bool isValid() const { return (!isNull() && m_raw->data[0] && m_raw->linesize[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))) + ); + } operator bool() const { return isValid() && isComplete(); }