mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 21:22:43 -06:00
Merge pull request #31029 from kg290/codex/ffmpeg-frame-size-warning
videoio: Report expected and actual FFmpeg frame sizes
This commit is contained in:
@@ -2953,7 +2953,13 @@ bool CvVideoWriter_FFMPEG::writeFrame( const unsigned char* data, int step, int
|
||||
CV_Assert(false);
|
||||
}
|
||||
|
||||
if( (width & -2) != frame_width || (height & -2) != frame_height || !data )
|
||||
if ((width & -2) != frame_width || (height & -2) != frame_height)
|
||||
{
|
||||
CV_LOG_WARNING(NULL, "write frame failed - expected frame size " << frame_width << "x" << frame_height
|
||||
<< " but got " << width << "x" << height);
|
||||
return false;
|
||||
}
|
||||
if (!data)
|
||||
return false;
|
||||
width = frame_width;
|
||||
height = frame_height;
|
||||
|
||||
Reference in New Issue
Block a user