diff options
author | Marton Balint <cus@passwd.hu> | 2019-03-14 02:00:27 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2019-04-15 22:22:31 +0200 |
commit | e036b8dcf46dabe00f1cb535d185db0c681942e7 (patch) | |
tree | 6c58eada5a3580038dbebce8a12f69dac4bf8245 | |
parent | abfeba97241e3cd485580b66b8b712d9a9779888 (diff) | |
download | ffmpeg-e036b8dcf46dabe00f1cb535d185db0c681942e7.tar.gz |
avdevice/decklink_dec: set configs before listing formats
Format list can be input and profile dependant.
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r-- | libavdevice/decklink_dec.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 9de8fa0c9d..4da9122bff 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -1072,6 +1072,12 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) goto error; } + if (ff_decklink_set_configs(avctx, DIRECTION_IN) < 0) { + av_log(avctx, AV_LOG_ERROR, "Could not set input configuration\n"); + ret = AVERROR(EIO); + goto error; + } + /* List supported formats. */ if (ctx->list_formats) { ff_decklink_list_formats(avctx, DIRECTION_IN); @@ -1079,12 +1085,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) goto error; } - if (ff_decklink_set_configs(avctx, DIRECTION_IN) < 0) { - av_log(avctx, AV_LOG_ERROR, "Could not set input configuration\n"); - ret = AVERROR(EIO); - goto error; - } - input_callback = new decklink_input_callback(avctx); ret = (ctx->dli->SetCallback(input_callback) == S_OK ? 0 : AVERROR_EXTERNAL); input_callback->Release(); |