fixed incorrect dump of the pixel format

This commit is contained in:
Vadim Pisarevsky 2020-02-03 13:22:56 +03:00 committed by GitHub
parent a13862e924
commit 174022547f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1052,7 +1052,9 @@ IplImage* CvCaptureFile::retrieveFramePixelBuffer() {
return 0;
}
} else {
fprintf(stderr, "OpenCV: unsupported pixel format '%s'\n", pixelFormat);
char pfBuf[] = { (char)pixelFormat, (char)(pixelFormat >> 8),
(char)(pixelFormat >> 16), (char)(pixelFormat >> 24), '\0' };
fprintf(stderr, "OpenCV: unsupported pixel format '%s'\n", pfBuf);
CVPixelBufferUnlockBaseAddress(mGrabbedPixels, 0);
CVBufferRelease(mGrabbedPixels);
mGrabbedPixels = NULL;