From b3a2adaac6526428843a1fa74eb9f896e898a78a Mon Sep 17 00:00:00 2001 From: Matthias Hunstock Date: Mon, 20 Mar 2017 00:16:37 +0100 Subject: avdevice/decklink: new option 'format_code' to set video format by fourCC Signed-off-by: Matthias Hunstock Signed-off-by: Marton Balint --- libavdevice/decklink_dec.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libavdevice/decklink_dec.cpp') diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 7df841b806..ffe65db0d0 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -539,9 +539,10 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) goto error; } - if (mode_num > 0) { + if (mode_num > 0 || cctx->format_code) { if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) { - av_log(avctx, AV_LOG_ERROR, "Could not set mode %d for %s\n", mode_num, fname); + av_log(avctx, AV_LOG_ERROR, "Could not set mode number %d or format code %s for %s\n", + mode_num, (cctx->format_code) ? cctx->format_code : "(unset)", fname); ret = AVERROR(EIO); goto error; } -- cgit v1.2.3