summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_common.cpp
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2019-05-01 12:47:43 +0200
committerMarton Balint <cus@passwd.hu>2019-05-05 20:07:35 +0200
commit15b8f36be17c45f17b662090ee2039c93eff9635 (patch)
treede4eb8c609b0271e95f2ef1212d0ff37a37a8eb2 /libavdevice/decklink_common.cpp
parent73f234fdf8d096ba2ab2cfd548b316937bf706b6 (diff)
downloadffmpeg-15b8f36be17c45f17b662090ee2039c93eff9635.tar.gz
avdevice/decklink: fix checking video mode in SDK version 11
Apparently in the new SDK one cannot query if VANC output is supported, so we will fall back to non-VANC output if enabling the video output with VANC fails. Fixes ticket #7867. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_common.cpp')
-rw-r--r--libavdevice/decklink_common.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp
index c3a1d5588c..659aa9be3f 100644
--- a/libavdevice/decklink_common.cpp
+++ b/libavdevice/decklink_common.cpp
@@ -273,21 +273,15 @@ int ff_decklink_set_format(AVFormatContext *avctx,
#if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000
if (direction == DIRECTION_IN) {
if (ctx->dli->DoesSupportVideoMode(ctx->video_input, ctx->bmd_mode, (BMDPixelFormat) cctx->raw_format,
- bmdVideoInputFlagDefault,
+ bmdSupportedVideoModeDefault,
&support) != S_OK)
return -1;
} else {
BMDDisplayMode actualMode = ctx->bmd_mode;
- if (!ctx->supports_vanc || ctx->dlo->DoesSupportVideoMode(bmdVideoConnectionUnspecified, ctx->bmd_mode, ctx->raw_format,
- bmdVideoOutputVANC,
- &actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode) {
- /* Try without VANC enabled */
- if (ctx->dlo->DoesSupportVideoMode(bmdVideoConnectionUnspecified, ctx->bmd_mode, ctx->raw_format,
- bmdVideoOutputFlagDefault,
- &actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode) {
- return -1;
- }
- ctx->supports_vanc = 0;
+ if (ctx->dlo->DoesSupportVideoMode(bmdVideoConnectionUnspecified, ctx->bmd_mode, ctx->raw_format,
+ bmdSupportedVideoModeDefault,
+ &actualMode, &support) != S_OK || !support || ctx->bmd_mode != actualMode) {
+ return -1;
}
}