Skip to content

Commit 0c0a403

Browse files
committed
dshow: print mode pName instead of ug name
NV12 will be mapped to UYVY, so instead of NV12, there will be misleadingly written UYVY. Actually, the FourCC stored in &pSubtype->Data could be used, because it mostly match. Chosen approach is, however, more conservative if the name doesn't match, because the "old-style" init with the codec name requires the mapping back from name to subtype and there doesn't seem to be a way to find a subtype from FourCC in genral.
1 parent 604bbf9 commit 0c0a403

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/video_capture/DirectShowGrabber.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -1307,13 +1307,8 @@ static const CHAR * GetSubtypeName(const GUID *pSubtype)
13071307
if (LocateSubtype(pSubtype) == sizeof BitCountMap / sizeof BitCountMap[0] - 1) {
13081308
memcpy(fourcc, &pSubtype->Data1, 4);
13091309
return fourcc;
1310-
} else {
1311-
if (BitCountMap[LocateSubtype(pSubtype)].ug_codec != VIDEO_CODEC_NONE) {
1312-
return get_codec_name(BitCountMap[LocateSubtype(pSubtype)].ug_codec);
1313-
} else { // not supported by UG
1314-
return GetSubtypeNameA(pSubtype);
1315-
}
13161310
}
1311+
return GetSubtypeNameA(pSubtype);
13171312
}
13181313

13191314
extern "C" const struct video_capture_info vidcap_dshow_info = {

0 commit comments

Comments
 (0)