The WebVTT spec expects this behavior and it fixes some files --- libavformat/webvttdec.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c index 38c281fe00..2e832b86eb 100644 --- a/libavformat/webvttdec.c +++ b/libavformat/webvttdec.c @@ -78,7 +78,7 @@ static int webvtt_read_header(AVFormatContext *s) int i; int64_t pos; AVPacket *sub; - const char *p, *identifier, *settings; + const char *p, *identifier, *settings, *arrow; int identifier_len, settings_len; int64_t ts_start, ts_end; @@ -120,12 +120,13 @@ static int webvtt_read_header(AVFormatContext *s) p++; } + if (!(arrow = strstr(p, "-->"))) + continue; + /* cue timestamps */ if ((ts_start = read_ts(p)) == AV_NOPTS_VALUE) break; - if (!(p = strstr(p, "-->"))) - break; - p += 2; + p = arrow + 2; do p++; while (*p == ' ' || *p == '\t'); if ((ts_end = read_ts(p)) == AV_NOPTS_VALUE) break; -- 2.26.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".