Skip to content
Snippets Groups Projects
Commit 46380e8d authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avformat/aviobuf/ff_get_line: also accept \r as end of line character


Fixes Ticket3108

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 0ca0b4c2
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment