Skip to content

Commit a41b2c5

Browse files
committed
Revert "vdisp,vcap/decklink: do not fail if insuff drv ver"
Since the following error, the hard fail is again desirable. It, however doesn't fail if the driver is usable (not so old, using same ABI). This reverts commit cac114d.
1 parent 9a0594d commit a41b2c5

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/video_capture/decklink.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,8 +1426,6 @@ vidcap_decklink_init(struct vidcap_params *params, void **state)
14261426
{
14271427
const char *fmt = vidcap_params_get_fmt(params);
14281428

1429-
blackmagic_api_version_check();
1430-
14311429
if (strcmp(fmt, "help") == 0 || strcmp(fmt, "fullhelp") == 0) {
14321430
decklink_help(strcmp(fmt, "fullhelp") == 0);
14331431
return VIDCAP_INIT_NOERR;
@@ -1461,6 +1459,11 @@ vidcap_decklink_init(struct vidcap_params *params, void **state)
14611459
return VIDCAP_INIT_FAIL;
14621460
}
14631461

1462+
if (!blackmagic_api_version_check()) {
1463+
delete s;
1464+
return VIDCAP_INIT_FAIL;
1465+
}
1466+
14641467
switch (get_bits_per_component(s->codec)) {
14651468
case 0: s->requested_bit_depth = 0; break;
14661469
case 8: s->requested_bit_depth = bmdDetectedVideoInput8BitDepth; break;

src/video_display/decklink.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,8 +1416,6 @@ static void *display_decklink_init(struct module *parent, const char *fmt, unsig
14161416
IDeckLinkConfiguration* deckLinkConfiguration = NULL;
14171417
// for Decklink Studio which has switchable XLR - analog 3 and 4 or AES/EBU 3,4 and 5,6
14181418

1419-
blackmagic_api_version_check();
1420-
14211419
if (strcmp(fmt, "help") == 0 || strcmp(fmt, "fullhelp") == 0) {
14221420
show_help(strcmp(fmt, "fullhelp") == 0);
14231421
return INIT_NOERR;
@@ -1446,6 +1444,11 @@ static void *display_decklink_init(struct module *parent, const char *fmt, unsig
14461444
return NULL;
14471445
}
14481446

1447+
if (!blackmagic_api_version_check()) {
1448+
delete s;
1449+
return NULL;
1450+
}
1451+
14491452
// Connect to the first DeckLink instance
14501453
for (auto &d : bmd_get_sorted_devices(&s->com_initialized, true)) {
14511454
s->deckLink = get<0>(d).release(); // unmanage

0 commit comments

Comments
 (0)