- if (av_match_ext(p->filename, "svg") || av_match_ext(p->filename, "svgz"))
- return AVPROBE_SCORE_EXTENSION + 1;
+ const uint8_t *b = p->buf;
+ const uint8_t *end = p->buf + p->buf_size;
+ if (memcmp(p->buf, "<?xml", 5))
+ return 0;
+ while (b < end) {
+ b += ff_subtitles_next_line(b);
+ if (b >= end - 4)
+ return 0;
+ if (!memcmp(b, "<svg", 4))
+ return AVPROBE_SCORE_EXTENSION + 1;
+ }