Commit 46380e8d authored by Michael Niedermayer's avatar Michael Niedermayer

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

Fixes Ticket3108
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0ca0b4c2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment