This is done to enable input format autodetection in decklink_dec.
Showing the changes to libavdevice/decklink_dec.cpp (1 of 4 files). Show all
Unified · Split
| @@ -916,6 +916,12 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 915 unmodified lines | |||
| 916 | goto error; | 916 | goto error; |
| 917 | } | 917 | } |
| 918 | 918 | ||
| 919 | if (ff_decklink_set_configs(avctx, DIRECTION_IN) < 0) { | ||
| 920 | av_log(avctx, AV_LOG_ERROR, "Could not set input configuration\n"); | ||
| 921 | ret = AVERROR(EIO); | ||
| 922 | goto error; | ||
| 923 | } | ||
| 924 | |||
| 919 | if (mode_num > 0 || cctx->format_code) { | 925 | if (mode_num > 0 || cctx->format_code) { |
| 920 | if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) { | 926 | if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) { |
| 921 | av_log(avctx, AV_LOG_ERROR, "Could not set mode number %d or format code %s for %s\n", | 927 | av_log(avctx, AV_LOG_ERROR, "Could not set mode number %d or format code %s for %s\n", |