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

@@ -162,6 +162,10 @@ static int decklink_setup_video(AVFormatContext *avctx, AVStream *st)
return -1;
}
if (ff_decklink_set_configs(avctx, DIRECTION_OUT) < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not set output configuration\n");
return -1;
}
if (ff_decklink_set_format(avctx, c->width, c->height,
st->time_base.num, st->time_base.den, c->field_order)) {
av_log(avctx, AV_LOG_ERROR, "Unsupported video size, framerate or field order!"