Fixes: kira-poc
Unified · Split
| @@ -878,10 +878,14 @@ static int svg_probe(AVProbeData *p) · 877 unmodified lines | |||
| 878 | { | 878 | { |
| 879 | const uint8_t *b = p->buf; | 879 | const uint8_t *b = p->buf; |
| 880 | const uint8_t *end = p->buf + p->buf_size; | 880 | const uint8_t *end = p->buf + p->buf_size; |
| 881 | |||
| 881 | if (memcmp(p->buf, "<?xml", 5)) | 882 | if (memcmp(p->buf, "<?xml", 5)) |
| 882 | return 0; | 883 | return 0; |
| 883 | while (b < end) { | 884 | while (b < end) { |
| 884 | b += ff_subtitles_next_line(b); | 885 | int inc = ff_subtitles_next_line(b); |
| 886 | if (!inc) | ||
| 887 | break; | ||
| 888 | b += inc; | ||
| 885 | if (b >= end - 4) | 889 | if (b >= end - 4) |
| 886 | return 0; | 890 | return 0; |
| 887 | if (!memcmp(b, "<svg", 4)) | 891 | if (!memcmp(b, "<svg", 4)) |