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

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
106 return -1;106 return -1;
107 }107 }
108 108
109 if (strcmp(codec->name, "flv") && strcmp(codec->name, "mpeg4") && strcmp(codec->name, "huffyuv")) {109 if (!(codec->capabilities & AV_CODEC_CAP_DRAW_HORIZ_BAND)) {
110 av_log(NULL, AV_LOG_ERROR, "Wrong codec\n");110 av_log(NULL, AV_LOG_ERROR, "Codec does not support draw_horiz_band\n");
111 return -1;111 return -1;
112 }112 }
113 113
@@ -222,7 +222,7 @@ int main(int argc, char **argv) · 108 unmodified lines
222{222{
223 if (argc < 2)223 if (argc < 2)
224 {224 {
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]);
226 return 1;226 return 1;
227 }227 }
228 228

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