Format list can be input and profile dependant.
Unified · Split
| @@ -1072,6 +1072,12 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 1071 unmodified lines | ||
| 1072 | 1072 | goto error; |
| 1073 | 1073 | } |
| 1074 | 1074 | |
| 1075 | + if (ff_decklink_set_configs(avctx, DIRECTION_IN) < 0) { | |
| 1076 | + av_log(avctx, AV_LOG_ERROR, "Could not set input configuration\n"); | |
| 1077 | + ret = AVERROR(EIO); | |
| 1078 | + goto error; | |
| 1079 | + } | |
| 1080 | + | |
| 1075 | 1081 | /* List supported formats. */ |
| 1076 | 1082 | if (ctx->list_formats) { |
| 1077 | 1083 | ff_decklink_list_formats(avctx, DIRECTION_IN); |
| @@ -1079,12 +1085,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 1 unmodified line | ||
| 1079 | 1085 | goto error; |
| 1080 | 1086 | } |
| 1081 | 1087 | |
| 1082 | − if (ff_decklink_set_configs(avctx, DIRECTION_IN) < 0) { | |
| 1083 | − av_log(avctx, AV_LOG_ERROR, "Could not set input configuration\n"); | |
| 1084 | − ret = AVERROR(EIO); | |
| 1085 | − goto error; | |
| 1086 | − } | |
| 1087 | − | |
| 1088 | 1088 | input_callback = new decklink_input_callback(avctx); |
| 1089 | 1089 | ret = (ctx->dli->SetCallback(input_callback) == S_OK ? 0 : AVERROR_EXTERNAL); |
| 1090 | 1090 | input_callback->Release(); |