summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_enc.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_enc.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_enc.cpp')
-rw-r--r--libavdevice/decklink_enc.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index 8b621d0054..04b06aee3a 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -197,8 +197,11 @@ static int decklink_setup_video(AVFormatContext *avctx, AVStream *st)
" Check available formats with -list_formats 1.\n");
return -1;
}
- if (ctx->dlo->EnableVideoOutput(ctx->bmd_mode,
- ctx->supports_vanc ? bmdVideoOutputVANC : bmdVideoOutputFlagDefault) != S_OK) {
+ if (ctx->supports_vanc && ctx->dlo->EnableVideoOutput(ctx->bmd_mode, bmdVideoOutputVANC) != S_OK) {
+ av_log(avctx, AV_LOG_WARNING, "Could not enable video output with VANC! Trying without...\n");
+ ctx->supports_vanc = 0;
+ }
+ if (!ctx->supports_vanc && ctx->dlo->EnableVideoOutput(ctx->bmd_mode, bmdVideoOutputFlagDefault) != S_OK) {
av_log(avctx, AV_LOG_ERROR, "Could not enable video output!\n");
return -1;
}