summaryrefslogtreecommitdiff
path: root/libavdevice/decklink_enc.cpp
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2021-08-09 07:43:34 +0800
committerLimin Wang <lance.lmwang@gmail.com>2021-08-16 10:00:39 +0800
commitb923bfc679358fe109ca66b6ddf9d08ad0e19b7e (patch)
tree95b84ce53f03e63a8897ab95231eb38c16a5aa13 /libavdevice/decklink_enc.cpp
parentca788d184cbf0a907ca7db4e4dad9975a91a5839 (diff)
downloadffmpeg-b923bfc679358fe109ca66b6ddf9d08ad0e19b7e.tar.gz
avdevice/decklink: add link configuration option
Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavdevice/decklink_enc.cpp')
-rw-r--r--libavdevice/decklink_enc.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index 4c1eb05be4..6dec5f35ea 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -559,6 +559,8 @@ av_cold int ff_decklink_write_header(AVFormatContext *avctx)
ctx->list_formats = cctx->list_formats;
ctx->preroll = cctx->preroll;
ctx->duplex_mode = cctx->duplex_mode;
+ if (cctx->link > 0 && (unsigned int)cctx->link < FF_ARRAY_ELEMS(decklink_link_conf_map))
+ ctx->link = decklink_link_conf_map[cctx->link];
cctx->ctx = ctx;
#if CONFIG_LIBKLVANC
if (klvanc_context_create(&ctx->vanc_ctx) < 0) {