History

avdevice/decklink_dec: set configs before listing formats

Format list can be input and profile dependant.

Marton Balint committed 7 years ago

Commit e036b8d1 parent abfeba91 file · +6 −6Browse files

Showing the changes to libavdevice/decklink_dec.cpp (1 of 1 file). Show all

Unified · Split

libavdevice/decklink_dec.cpp+6−6
@@ -1072,6 +1072,12 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 1071 unmodified lines
10721072 goto error;
10731073 }
10741074
1075+ if (ff_decklink_set_configs(avctx, DIRECTION_IN) < 0) {
1076+ av_log(avctx, AV_LOG_ERROR, "Could not set input configuration\n");
1077+ ret = AVERROR(EIO);
1078+ goto error;
1079+ }
1080+
10751081 /* List supported formats. */
10761082 if (ctx->list_formats) {
10771083 ff_decklink_list_formats(avctx, DIRECTION_IN);
@@ -1079,12 +1085,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 1 unmodified line
10791085 goto error;
10801086 }
10811087
1082− if (ff_decklink_set_configs(avctx, DIRECTION_IN) < 0) {
1083− av_log(avctx, AV_LOG_ERROR, "Could not set input configuration\n");
1084− ret = AVERROR(EIO);
1085− goto error;
1086− }
1087−
10881088 input_callback = new decklink_input_callback(avctx);
10891089 ret = (ctx->dli->SetCallback(input_callback) == S_OK ? 0 : AVERROR_EXTERNAL);
10901090 input_callback->Release();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t