Fail render frame test for unsupported pixel formats

This commit is contained in:
Cameron Gutman
2022-01-02 15:03:49 -06:00
parent 61092b34de
commit f7c8ad4c5a

View File

@@ -549,6 +549,12 @@ bool SdlRenderer::testRenderFrame(AVFrame* frame)
av_frame_free(&swFrame);
}
else if (!isPixelFormatSupported(m_VideoFormat, (AVPixelFormat)frame->format)) {
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
"Swframe pixel format unsupported: %d",
frame->format);
return false;
}
return true;
}