diff options
author | Marton Balint <cus@passwd.hu> | 2016-06-18 12:04:15 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2016-06-26 19:18:02 +0200 |
commit | da89c6e37cf2fb3645611e8196cc28b6acfb9bd6 (patch) | |
tree | a53225df829e12250d4bb8c0e316dde7eb8dd317 /libavdevice/decklink_dec.cpp | |
parent | 8f9fa49bd8bfd8cd2008da97eec7acf18873b960 (diff) | |
download | ffmpeg-da89c6e37cf2fb3645611e8196cc28b6acfb9bd6.tar.gz |
avdevice/decklink: add support for audio and video input selection
Reviewed-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice/decklink_dec.cpp')
-rw-r--r-- | libavdevice/decklink_dec.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index fc9633f5e9..7f45224308 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -28,6 +28,7 @@ extern "C" { #include "config.h" #include "libavformat/avformat.h" #include "libavformat/internal.h" +#include "libavutil/common.h" #include "libavutil/imgutils.h" #if CONFIG_LIBZVBI #include <libzvbi.h> @@ -446,6 +447,10 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) ctx->teletext_lines = cctx->teletext_lines; ctx->preroll = cctx->preroll; ctx->duplex_mode = cctx->duplex_mode; + if (cctx->video_input > 0 && (unsigned int)cctx->video_input < FF_ARRAY_ELEMS(decklink_video_connection_map)) + ctx->video_input = decklink_video_connection_map[cctx->video_input]; + if (cctx->audio_input > 0 && (unsigned int)cctx->audio_input < FF_ARRAY_ELEMS(decklink_audio_connection_map)) + ctx->audio_input = decklink_audio_connection_map[cctx->audio_input]; cctx->ctx = ctx; #if !CONFIG_LIBZVBI |