We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ffea77 commit 710312aCopy full SHA for 710312a
src/video_capture/DirectShowGrabber.cpp
@@ -1227,6 +1227,13 @@ static const CHAR * GetSubtypeNameA(const GUID *pSubtype)
1227
// would use the header file that picks the A or W version.
1228
static const CHAR * GetSubtypeName(const GUID *pSubtype)
1229
{
1230
- return GetSubtypeNameA(pSubtype);
+ thread_local char fourcc[5] = "";
1231
+ // the type is unknown to us, so print FourCC
1232
+ if (LocateSubtype(pSubtype) == sizeof BitCountMap / sizeof BitCountMap[0] - 1) {
1233
+ memcpy(fourcc, &pSubtype->Data1, 4);
1234
+ return fourcc;
1235
+ } else {
1236
+ return GetSubtypeNameA(pSubtype);
1237
+ }
1238
}
1239
0 commit comments