| 116 | } |
| 117 | |
| 118 | int main(int argc, char **argv) |
| 119 | { |
| 120 | int i; |
| 121 | int ret = 0; |
| 122 | const char *hash_name; |
| 123 | |
| 124 | if (argc == 1) { |
| 125 | usage(); |
| 126 | return 0; |
| 127 | } |
| 128 | |
| 129 | hash_name = argv[1]; |
| 130 | out_b64 = av_strstart(hash_name, "b64:", &hash_name); |
| 131 | if ((ret = av_hash_alloc(&hash, hash_name)) < 0) { |
| 132 | switch(ret) { |
| 133 | case AVERROR(EINVAL): |
| 134 | printf("Invalid hash type: %s\n", hash_name); |
| 135 | break; |
| 136 | case AVERROR(ENOMEM): |
| 137 | printf("%s\n", strerror(errno)); |
| 138 | break; |
| 139 | } |
| 140 | return 1; |
| 141 | } |
| 142 | |
| 143 | for (i = 2; i < argc; i++) |
| 144 | ret |= check(argv[i]); |
| 145 | |
| 146 | if (argc < 3) |
| 147 | ret |= check(NULL); |
| 148 | |
| 149 | av_hash_freep(&hash); |
| 150 | |
| 151 | return ret; |
| 152 | } |
nothing calls this directly
no test coverage detected