diff options
author | Matthias Hunstock <atze@fem.tu-ilmenau.de> | 2017-03-20 00:16:37 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2017-03-22 02:07:50 +0100 |
commit | b3a2adaac6526428843a1fa74eb9f896e898a78a (patch) | |
tree | 4cb0f336b40ffc5e21212c8f0f901bd47d438a93 /libavdevice/decklink_dec.cpp | |
parent | 607bffbed2872641b7f63127934f0398041fa55e (diff) |
avdevice/decklink: new option 'format_code' to set video format by fourCC
Signed-off-by: Matthias Hunstock <atze@fem.tu-ilmenau.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, 3 insertions, 2 deletions
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; } |