mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0032092: Visualization, TKService - Image_VideoRecorder writes garbage from Grayscale image
Image_VideoRecorder::writeVideoFrame(), added protection from API misuse.
This commit is contained in:
@@ -431,6 +431,11 @@ Standard_Boolean Image_VideoRecorder::openVideoCodec (const Image_VideoParams& t
|
||||
Standard_Boolean Image_VideoRecorder::writeVideoFrame (const Standard_Boolean theToFlush)
|
||||
{
|
||||
#ifdef HAVE_FFMPEG
|
||||
if (myImgSrcRgba.Format() != Image_Format_RGBA)
|
||||
{
|
||||
throw Standard_ProgramError ("Image_VideoRecorder, unsupported image format");
|
||||
}
|
||||
|
||||
int aResAv = 0;
|
||||
AVCodecContext* aCodecCtx = myVideoStream->codec;
|
||||
if (!theToFlush)
|
||||
|
Reference in New Issue
Block a user