mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/subtitles: ignore extra '\r' at line endings
This commit is contained in:
parent
2e254bb897
commit
6347146e3d
@ -417,7 +417,7 @@ ptrdiff_t ff_subtitles_read_line(FFTextReader *tr, char *buf, size_t size)
|
||||
buf[cur++] = c;
|
||||
buf[cur] = '\0';
|
||||
}
|
||||
if (ff_text_peek_r8(tr) == '\r')
|
||||
while (ff_text_peek_r8(tr) == '\r')
|
||||
ff_text_r8(tr);
|
||||
if (ff_text_peek_r8(tr) == '\n')
|
||||
ff_text_r8(tr);
|
||||
|
@ -188,7 +188,7 @@ static av_always_inline int ff_subtitles_next_line(const char *ptr)
|
||||
{
|
||||
int n = strcspn(ptr, "\r\n");
|
||||
ptr += n;
|
||||
if (*ptr == '\r') {
|
||||
while (*ptr == '\r') {
|
||||
ptr++;
|
||||
n++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user