mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 11:40:22 +00:00
DirectShow: use FourCC as a codec name if unknown
This commit is contained in:
@@ -1227,6 +1227,13 @@ static const CHAR * GetSubtypeNameA(const GUID *pSubtype)
|
||||
// would use the header file that picks the A or W version.
|
||||
static const CHAR * GetSubtypeName(const GUID *pSubtype)
|
||||
{
|
||||
return GetSubtypeNameA(pSubtype);
|
||||
thread_local char fourcc[5] = "";
|
||||
// the type is unknown to us, so print FourCC
|
||||
if (LocateSubtype(pSubtype) == sizeof BitCountMap / sizeof BitCountMap[0] - 1) {
|
||||
memcpy(fourcc, &pSubtype->Data1, 4);
|
||||
return fourcc;
|
||||
} else {
|
||||
return GetSubtypeNameA(pSubtype);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user