mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
avformat/aviobuf/ff_get_line: also accept \r as end of line character
Fixes Ticket3108 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0ca0b4c29c
commit
46380e8d26
@ -665,7 +665,9 @@ int ff_get_line(AVIOContext *s, char *buf, int maxlen)
|
||||
c = avio_r8(s);
|
||||
if (c && i < maxlen-1)
|
||||
buf[i++] = c;
|
||||
} while (c != '\n' && c);
|
||||
} while (c != '\n' && c != '\r' && c);
|
||||
if (c == '\r' && avio_r8(s) != '\n')
|
||||
avio_skip(s, -1);
|
||||
|
||||
buf[i] = 0;
|
||||
return i;
|
||||
|
Loading…
Reference in New Issue
Block a user