History

api/api-band-test: Query codec capabilities to decide admissibility

Andreas Rheinhardt committed 4 years ago

Commit edcfa841 parent b8cc5cf1 file · +3 −3Browse files

Showing the changes to tests/api (1 of 1 file). Show all

Unified · Split

tests/api/api-band-test.c+3−3
@@ -106,8 +106,8 @@ static int video_decode(const char *input_filename) · 105 unmodified lines
106106 return -1;
107107 }
108108
109− if (strcmp(codec->name, "flv") && strcmp(codec->name, "mpeg4") && strcmp(codec->name, "huffyuv")) {
110− av_log(NULL, AV_LOG_ERROR, "Wrong codec\n");
109+ if (!(codec->capabilities & AV_CODEC_CAP_DRAW_HORIZ_BAND)) {
110+ av_log(NULL, AV_LOG_ERROR, "Codec does not support draw_horiz_band\n");
111111 return -1;
112112 }
113113
@@ -222,7 +222,7 @@ int main(int argc, char **argv) · 108 unmodified lines
222222 {
223223 if (argc < 2)
224224 {
225− av_log(NULL, AV_LOG_ERROR, "Incorrect input: expected %s <name of a video file>\nNote that test works only for huffyuv, flv and mpeg4 decoders\n", argv[0]);
225+ av_log(NULL, AV_LOG_ERROR, "Incorrect input: expected %s <name of a video file>\n", argv[0]);
226226 return 1;
227227 }
228228

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