Skip to content

Commit fe536e1

Browse files
committed
fix for AVAPI frame format
1 parent 5e167a4 commit fe536e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/frame.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ class Frame : public FFWrapperPtr<AVFrame>
264264

265265
bool isComplete() const { return m_isComplete; }
266266

267-
bool isValid() const { return (!isNull() && m_raw->data[0] && m_raw->linesize[0]); }
267+
bool isValid() const {
268+
return (!isNull() && (m_raw->data[0] && m_raw->linesize[0]) || ((m_raw->format == AV_PIX_FMT_VAAPI)));
269+
}
268270

269271
operator bool() const { return isValid() && isComplete(); }
270272

0 commit comments

Comments
 (0)