mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01:00
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:
committed by
Marton Balint
parent
0e7865ce41
commit
aa7b0329ff
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user