Skip to content

Commit a26ac91

Browse files
committed
vcap/dshow: Fix crash on unknown codec
1 parent be2aeec commit a26ac91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video_capture/DirectShowGrabber.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ vidcap_dshow_probe_internal(device_info **available_cards, int *count,
515515
}
516516

517517
codec_t ug_codec = get_ug_codec(&mediaType->subtype);
518-
bool force_rgb = is_codec_opaque(ug_codec) || codec_is_planar(ug_codec) || ug_codec == VIDEO_CODEC_NONE;
518+
bool force_rgb = ug_codec == VC_NONE || is_codec_opaque(ug_codec) || codec_is_planar(ug_codec);
519519

520520
snprintf(cards[card_count - 1].modes[mode_idx].id,
521521
sizeof cards[card_count - 1].modes[mode_idx].id,

0 commit comments

Comments
 (0)