int64_t pos;
AVPacket *sub;
const char *p, *identifier, *settings;
- int identifier_len, settings_len;
+ size_t identifier_len, settings_len;
int64_t ts_start, ts_end;
ff_subtitles_read_chunk(s->pb, &cue);
break;
/* optional cue settings */
- p += strcspn(p, "\n\t ");
+ p += strcspn(p, "\n\r\t ");
while (*p == '\t' || *p == ' ')
p++;
settings = p;
ff_subtitles_queue_finalize(s, &webvtt->q);
end:
+ if (res < 0)
+ ff_subtitles_queue_clean(&webvtt->q);
av_bprint_finalize(&cue, NULL);
return res;
}