| 108 | }; |
| 109 | |
| 110 | static enum AVCodecID str2id(const IdStrMap *tags, const char *str) |
| 111 | { |
| 112 | str = strrchr(str, '.'); |
| 113 | if (!str) |
| 114 | return AV_CODEC_ID_NONE; |
| 115 | str++; |
| 116 | |
| 117 | while (tags->id) { |
| 118 | if (!av_strcasecmp(str, tags->str)) |
| 119 | return tags->id; |
| 120 | |
| 121 | tags++; |
| 122 | } |
| 123 | return AV_CODEC_ID_NONE; |
| 124 | } |
| 125 | |
| 126 | enum AVCodecID ff_guess_image2_codec(const char *filename) |
| 127 | { |
no test coverage detected