Skip to content

Commit f32f923

Browse files
committed
avdevice/decklink: add support for SDK version 11.5
Fixes ticket #8534. Signed-off-by: Marton Balint <cus@passwd.hu>
1 parent 95324ec commit f32f923

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

libavdevice/decklink_common.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,22 @@ int ff_decklink_set_format(AVFormatContext *avctx,
269269
if (ctx->bmd_mode == bmdModeUnknown)
270270
return -1;
271271

272-
#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
272+
#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b050000
273+
if (direction == DIRECTION_IN) {
274+
BMDDisplayMode actualMode = ctx->bmd_mode;
275+
if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format,
276+
bmdNoVideoInputConversion, bmdSupportedVideoModeDefault,
277+
&actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode)
278+
return -1;
279+
} else {
280+
BMDDisplayMode actualMode = ctx->bmd_mode;
281+
if (ctx->dlo->DoesSupportVideoMode(bmdVideoConnectionUnspecified, ctx->bmd_mode, ctx->raw_format,
282+
bmdNoVideoOutputConversion, bmdSupportedVideoModeDefault,
283+
&actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode)
284+
return -1;
285+
}
286+
return 0;
287+
#elif BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
273288
if (direction == DIRECTION_IN) {
274289
if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format,
275290
bmdSupportedVideoModeDefault,

0 commit comments

Comments
 (0)