mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
avdevice/decklink_dec: set configs before listing formats
Format list can be input and profile dependant. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
abfeba9724
commit
e036b8dcf4
@ -1072,6 +1072,12 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
|
|||||||
goto error;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/* List supported formats. */
|
/* List supported formats. */
|
||||||
if (ctx->list_formats) {
|
if (ctx->list_formats) {
|
||||||
ff_decklink_list_formats(avctx, DIRECTION_IN);
|
ff_decklink_list_formats(avctx, DIRECTION_IN);
|
||||||
@ -1079,12 +1085,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
|
|||||||
goto error;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
input_callback = new decklink_input_callback(avctx);
|
input_callback = new decklink_input_callback(avctx);
|
||||||
ret = (ctx->dli->SetCallback(input_callback) == S_OK ? 0 : AVERROR_EXTERNAL);
|
ret = (ctx->dli->SetCallback(input_callback) == S_OK ? 0 : AVERROR_EXTERNAL);
|
||||||
input_callback->Release();
|
input_callback->Release();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user