Showing the changes to libavdevice/decklink_dec.cpp (1 of 6 files). Show all
Unified · Split
| @@ -539,9 +539,10 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 538 unmodified lines | ||
| 539 | 539 | goto error; |
| 540 | 540 | } |
| 541 | 541 | |
| 542 | − if (mode_num > 0) { | |
| 542 | + if (mode_num > 0 || cctx->format_code) { | |
| 543 | 543 | if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) { |
| 544 | − av_log(avctx, AV_LOG_ERROR, "Could not set mode %d for %s\n", mode_num, fname); | |
| 544 | + av_log(avctx, AV_LOG_ERROR, "Could not set mode number %d or format code %s for %s\n", | |
| 545 | + mode_num, (cctx->format_code) ? cctx->format_code : "(unset)", fname); | |
| 545 | 546 | ret = AVERROR(EIO); |
| 546 | 547 | goto error; |
| 547 | 548 | } |