avdevice/decklink: refactor ff_decklink_set_format function

This is done to enable input format autodetection in decklink_dec.

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Karthick J
2017-11-07 09:32:23 +05:30
committed by Marton Balint
parent 0e7865ce41
commit aa7b0329ff
4 changed files with 35 additions and 14 deletions

View File

@@ -916,6 +916,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;
}
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 number %d or format code %s for %s\n",